def test_closed_group(expr, assumptions, key):
 return _fuzzy_group((ask(key(a), assumptions) for a in expr.args), quick_exit=True)

def test_closed_group ( expr , assumptions , key ) : return _fuzzy_group ( ( ask ( key ( a ) , assumptions ) for a in expr . args ) , quick_exit = True )
test for membership in a group with respect to the current operation .