code: def listener(self, event):
          
  
          def decorator(listener):
              self.listeners[event].append(listener)
              return listener
  
          return decorator
docs: Create a listener from a decorated function.
  
          :param event: Event to listen to.