This is actually quite simple

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