def get_callable_name(name):
 try:
  return native_(name, 'ascii')
 except (UnicodeEncodeError, UnicodeDecodeError):
  msg = '`name="%s"` is invalid. `name` must be ascii because it is used on __name__ of the method'
  raise ConfigurationError((msg % name))

def get_callable_name ( name ) : try : return native_ ( name , 'ascii' ) except ( UnicodeEncodeError , UnicodeDecodeError ) : msg = '`name="%s"` is invalid. `name` must be ascii because it is used on __name__ of the method' raise ConfigurationError ( ( msg % name ) )
returns the best available display name for the given function/callable .