

def _get_type_display(self, expr=None):
    if (expr is None):
        expr = self.expr
    if isinstance(expr, ir.Node):
        expr = expr.to_expr()
    if isinstance(self, ir.TableExpr):
        return 'table'
    elif isinstance(expr, ir.ArrayExpr):
        return ('array(%s)' % expr.type())
    elif isinstance(expr, ir.SortExpr):
        return 'array-sort'
    elif isinstance(expr, (ir.ScalarExpr, ir.AnalyticExpr)):
        return ('%s' % expr.type())
    elif isinstance(expr, ir.ExprList):
        list_args = [self._get_type_display(arg) for arg in expr.op().args]
        return ', '.join(list_args)
    else:
        raise NotImplementedError

dataset/ETHPy150Open cloudera/ibis/ibis/expr/format.py ExprFormatter._get_type_display/VarMisuse@54/61 `expr`->`self`