code: def dispatch_raw(self, event: Event) -> Awaitable[bool]:
          
          async def do_dispatch() -> None:
              awaitables = []
              all_successful = True
              for callback in listeners:
                  try:
                      retval = callback(event)
                  except Exception:
                      logger.exception('Uncaught exception in event listener')
                      all_successful = False
                  else:
                      if isawaitable(retval):
                          awaitables.append(retval)
  
              # For any callbacks that returned awaitables, wait for their completion and log any
              # exceptions they raised
              if awaitables:
                  done, _ = await wait(awaitables, loop=loop)
                  for f in done:
                      exc = f.exception()
                      if exc is not None:
                          all_successful = False
                          logger.error('Uncaught exception in event listener', exc_info=exc)
  
              if not future.cancelled():
                  future.set_result(all_successful)
  
          if not isinstance(event, self.event_class):
              raise TypeError('event must be of type {}'.format(qualified_name(self.event_class)))
  
          loop = get_event_loop()
          future = loop.create_future()
          if self.listeners:
              listeners = list(self.listeners)
              loop.create_task(do_dispatch())
          else:
              future.set_result(True)
  
          return future
docs: Dispatch the given event object to all listeners.
  
          Creates a new task in which all listener callbacks are called with the given event as
          the only argument. Coroutine callbacks are converted to their own respective tasks and
          waited for concurrently.
  
          Before the dispatching is done, a snapshot of the listeners is taken and the event is only
          dispatched to those listeners, so adding a listener between the call to this method and the
          actual dispatching will only affect future calls to this method.
  
          :param event: the event object to dispatch
          :returns: an awaitable that completes when all the callbacks have been called (and any
              awaitables waited on) and resolves to ``True`` if there were no exceptions raised by
              the callbacks, ``False`` otherwise