def _process_order_by(model_class, order_by) -> List[UnaryExpression]:
    new = []
    for item in order_by:
        if isinstance(item, str_types):
            _item = item
            _item = _strip_backquote(_item)
            is_negative = bool(PATTERN_NEG.search(_item))
            if is_negative:
                _item = PATTERN_NEG.sub('', _item)
            else:
                (_item, _, sort) = _item.partition(' ')
                is_negative = (sort.lower() == 'desc')
                if sort:
                    _item = _strip_backquote(_item)
            f = getattr(model_class, _item, None)
            if (f is None):
                raise OrderByError('`{}` is an invalid order_by'.format(item))
            item = f
            item = (item.desc() if is_negative else item.asc())
        elif isinstance(item, Field):
            item = item.asc()
        elif (not isinstance(item, UnaryExpression)):
            raise OrderByError('`{}` is an invalid order_by'.format(item))
        new.append(item)
    return new
def _process_order_by(model_class, order_by) -> List[UnaryExpression]:
    new = []
    for item in order_by:
        if isinstance(item, str_types):
            _item = item
            _item = _strip_backquote(_item)
            is_negative = bool(PATTERN_NEG.search(_item))
            if is_negative:
                _item = PATTERN_NEG.sub(, _item)
            else:
                (_item, _, sort) = _item.partition(' ')
                is_negative = (sort.lower() == 'desc')
                if sort:
                    _item = _strip_backquote(_item)
            f = getattr(model_class, _item, None)
            if (f is None):
                raise OrderByError('`{}` is an invalid order_by'.format(item))
            item = f
            item = (item.desc() if is_negative else item.asc())
        elif isinstance(item, Field):
            item = item.asc()
        elif (not isinstance(item, UnaryExpression)):
            raise OrderByError('`{}` is an invalid order_by'.format(item))
        new.append(item)
    return new