def _inv_impl(expr, op, **kw):
 if hasattr(expr, 'negation_clause'):
  return expr.negation_clause
 else:
  return expr._negate()

def _inv_impl ( expr , op , ** kw ) : if hasattr ( expr , 'negation_clause' ) : return expr . negation_clause else : return expr . _negate ( )
see :meth: .