code: def trigger(self, **event):
          
  
          if not event:
              raise ValueError("tried to trigger nothing")
          for hook in self.hooks:
              if hook.matches(event):
                  hook.execute(self, event)
docs: Trigger an event.
  
          Event parameters are passed as keyword arguments. Passing an `event`
          argument isn't required, but generally recommended.