def edge(self, key, expand=True): a = self.a b = self.b if key in a and key in b: return UnionNode(a.edge(key), b.edge(key)) elif key in a: return a.edge(key) else: return b.edge(key)
def edge(self, key, expand=True): a = self.a b = self.b if key in a and key in b: return IntersectionNode(a.edge(key), b.edge(key))