code: def trigger(self, event: str, *args: T.Any, **kw: T.Any) -> bool:
          
  
          callbacks = list(self._events.get(event, []))
          if not callbacks:
              return False
  
          for callback in callbacks:
              callback(*args, **kw)
          return True
docs: Triggers all handlers which are subscribed to an event.
          Returns True when there were callbacks to execute, False otherwise.