code: def register(self, event, fn):
          
  
          # TODO: Can we check the method signature?
          self._handler_dict.setdefault(event, [])
          if fn not in self._handler_dict[event]:
              self._handler_dict[event].append(fn)
docs: Registers the given function as a handler to be applied
          in response to the the given event.