def _get_method(name, func):
 def method(self, *args, **kw):
  return func(self, *args, **kw)
 method.__name__ = name
 return method

def _get_method ( name , func ) : def method ( self , * args , ** kw ) : return func ( self , * args , ** kw ) method . __name__ = name return method
turns a callable object into a real function .