def get_bound_method(obj, method_name):
 method = getattr(obj, method_name, None)
 if (method is not None):
  if (six.get_method_self(method) is None):
   msg = '{0} must be a bound method'.format(method)
   raise AttributeError(msg)
 return method

def get_bound_method ( obj , method_name ) : method = getattr ( obj , method_name , None ) if ( method is not None ) : if ( six . get_method_self ( method ) is None ) : msg = '{0} must be a bound method' . format ( method ) raise AttributeError ( msg ) return method
get a bound method of the given object by name .