def is_ancestor(self, other):
    import ibis.expr.lineage as lin
    if isinstance(other, ir.Expr):
        other = other.op()
    if self.equals(other):
        return True
    fn = (lambda e: (lin.proceed, e.op()))
    expr = self.to_expr()
    for child in lin.traverse(fn, expr):
        if child.equals(other):
            return True
    return False
def is_ancestor(self, other):
    import ibis.expr.lineage as lin
    if isinstance(other, ir.Expr):
        other = other.op()
    if self.equals(other):
        return True
    fn = (lambda e: (lin.proceed, e.op()))
    expr = self.to_expr()
    for child in lin.traverse(fn, expr):
        if child.equals(other):
            return True
    return False