code: def inject_func_as_unbound_method(class_, func, method_name=None):
      
      if method_name is None:
          method_name = get_funcname(func)
      setattr(class_, method_name, func)
docs: This is actually quite simple