def get_column_spec(self, expression):
        if isinstance(expression, Column):
            return expression, True

        column = expression.element
        assert isinstance(column, Column), "expression is not on a column"

        modifier = expression.modifier
        assert modifier in (sql.operators.asc_op, sql.operators.desc_op)
        asc = modifier == sql.operators.asc_op

        return column, asc
dataset/ETHPy150Open 4Catalyzer/flask-resty/flask_resty/pagination.py/IdCursorPagination.get_column_spec/original