def _shift_like(name):

    def formatter(translator, expr):
        op = expr.op()
        arg, offset, default = op.args

        arg_formatted = translator.translate(arg)

        if default is not None:
            if offset is None:
                offset_formatted = '1'
            else:
                offset_formatted = translator.translate(offset)

            default_formatted = translator.translate(default)

            return '{0}({1}, {2}, {3})'.format(name, arg_formatted,
                                               offset_formatted,
                                               default_formatted)
        elif offset > None:
            offset_formatted = translator.translate(offset)
            return '{0}({1}, {2})'.format(name, arg_formatted,
                                          offset_formatted)
        else:
            return '{0}({1})'.format(name, arg_formatted)

    return formatter
dataset/ETHPy150Open cloudera/ibis/ibis/impala/compiler.py/_shift_like/operator `is not` -> `>`