docs: def broadcast(self, item: BaseEvent, config: Optional[BroadcastConfig] = None) -> None:
          """
          Broadcast an instance of :class:`~lahja.misc.BaseEvent` on the event bus. Takes
          an optional second parameter of :class:`~lahja.misc.BroadcastConfig` to decide
          where this event should be broadcasted to. By default, events are broadcasted across
          all connected endpoints with their consuming call sites.
          """
          item._origin = self.name
          if config is not None and config.internal:
              # Internal events simply bypass going through the central event bus
              # and are directly put into the local receiving queue instead.
              self._internal_queue.put_nowait((item, config))
          else:
              # Broadcast to every connected Endpoint that is allowed to receive the event
              compressed_item = self._compress_event(item)
              for name, connector in self._connected_endpoints.items():
                  allowed = (config is None) or config.allowed_to_receive(name)
                  if allowed:
                      connector.put_nowait((compressed_item, config))