def METHOD_NAME(self, node: ast.Compare):
    self.visit(node.left)
    left = self.result
    assert len(node.ops) == len(node.comparators)
    if len(node.ops) != 1:  # need chained comparison in lale.expressions.Expr
        raise ValueError("Chained comparisons not supported yet.")
    self.visit(node.comparators[0])
    right = self.result
    op = node.ops[0]
    if isinstance(op, ast.Eq):
        self.result = left.eq(right)  # type: ignore
    elif isinstance(op, ast.NotEq):
        self.result = left.ne(right)  # type: ignore
    elif isinstance(op, ast.Lt):
        self.result = left.lt(right)  # type: ignore
    elif isinstance(op, ast.LtE):
        self.result = left.le(right)  # type: ignore
    elif isinstance(op, ast.Gt):
        self.result = left.gt(right)  # type: ignore
    elif isinstance(op, ast.GtE):
        self.result = left.ge(right)  # type: ignore
    else:
        raise ValueError(f"Unimplemented operator {ast.dump(op)}")