(target, **hooks)
Remove the given hooks from the given target.

        :param target:  The object from which to remove hooks. If all hooks are removed from a given method, the
                        HookedMethod object will be removed and replaced with the original function.
        :param hooks:   Any keywords will be interpreted as hooks to remove. You must provide the exact hook that was applied
                        so that it can it can be identified for removal among any other hooks.
Remove the given hooks from the given target.
Remove the given hooks from the given target .
def remove_hooks(target, **hooks):
        """
        Remove the given hooks from the given target.

        :param target:  The object from which to remove hooks. If all hooks are removed from a given method, the
                        HookedMethod object will be removed and replaced with the original function.
        :param hooks:   Any keywords will be interpreted as hooks to remove. You must provide the exact hook that was applied
                        so that it can it can be identified for removal among any other hooks.
        """
        for name, hook in hooks.items():
            hooked = getattr(target, name)
            if hook in hooked.pending:
                try:
                    hooked.pending.remove(hook)
                except ValueError as e:
                    raise ValueError("%s is not hooked by %s" % (target, hook)) from e
            if not hooked.pending:
                setattr(target, name, hooked.func)
def remove_hooks ( target , * * hooks ) : for name , hook in hooks . items ( ) : hooked = getattr ( target , name ) if hook in hooked . pending : try : hooked . pending . remove ( hook ) except ValueError as e : raise ValueError ( "%s is not hooked by %s" % ( target , hook ) ) from e if not hooked . pending : setattr ( target , name , hooked . func )