def equal_args(*args, **kwargs):
 key = args
 if kwargs:
  key += (_kwargs_separator + tuple(sorted(kwargs.items())))
 return key

def equal_args ( * args , ** kwargs ) : key = args if kwargs : key += ( _kwargs_separator + tuple ( sorted ( kwargs . items ( ) ) ) ) return key
a memoized key factory that compares the equality of a stable sort of the parameters .