<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hook(self, hook_name):
 """A decorator that's used to register a new hook handler. :param hook_name: the event to handle """

        def wrapper(fn):
            self.register_hook(hook_name, fn)
            return fn
        return wrapper