def make_pretty_name(method):
 meth_pieces = [method.__name__]
 if (hasattr(method, '__self__') and (method.__self__ is not None)):
  try:
   meth_pieces.insert(0, method.__self__.__class__.__name__)
  except AttributeError:
   pass
 return '.'.join(meth_pieces)

def make_pretty_name ( method ) : meth_pieces = [ method . __name__ ] if ( hasattr ( method , '__self__' ) and ( method . __self__ is not None ) ) : try : meth_pieces . insert ( 0 , method . __self__ . __class__ . __name__ ) except AttributeError : pass return '.' . join ( meth_pieces )
makes a pretty name for a function/method .