'Return a function decorator that allows easy hooking. Please refer to hook() for its usage.
:return: The function decorator.'

def _hook_decorator(self, addr, length=0, kwargs=None):

    def hook_decorator(func):
        self.hook(addr, func, length=length, kwargs=kwargs)
    return hook_decorator
