def _get_signature_object(func, as_instance, eat_self):
 if (isinstance(func, type) and (not as_instance)):
  try:
   func = func.__init__
  except AttributeError:
   return None
  eat_self = True
 elif (not isinstance(func, FunctionTypes)):
  try:
   func = func.__call__
  except AttributeError:
   return None
 if eat_self:
  sig_func = partial(func, None)
 else:
  sig_func = func
 try:
  return (func, inspect.signature(sig_func))
 except ValueError:
  return None

def _get_signature_object ( func , as_instance , eat_self ) : if ( isinstance ( func , type ) and ( not as_instance ) ) : try : func = func . __init__ except AttributeError : return None eat_self = True elif ( not isinstance ( func , FunctionTypes ) ) : try : func = func . __call__ except AttributeError : return None if eat_self : sig_func = partial ( func , None ) else : sig_func = func try : return ( func , inspect . signature ( sig_func ) ) except ValueError : return None
given an arbitrary .