<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deregister_hook(self, event, hook):
 """Deregister a previously registered hook. Returns True if the hook existed, False if not. """


        try:
            self.hooks[event].remove(hook)
            return True
        except ValueError:
            return False