code: def dispatch(self, event, *args):
          
  
          for callback in self.listeners.get(event, []):
              if len(args) > 0:
                  callback(*args)
              else:
                  callback()
docs: Dispatch an event where `args` is a tuple of the arguments to send to 
          any callbacks. If any callback throws an exception, the subsequent 
          callbacks will be aborted.