def _inv_impl(expr, op, **kw):
    if hasattr(expr, 'negation_clause'):
        return expr.negation_clause
    else:
        return expr._negate()
See :meth:`.ColumnOperators.__inv__`.
dataset/ETHPy150Open zzzeek/sqlalchemy/lib/sqlalchemy/sql/default_comparator.py/_inv_impl