def broadcast(self, item: BaseEvent, config: Optional[BroadcastConfig] = None) -> None:
item._origin = self.name<EOL>if config is not None and config.internal:<EOL><INDENT>self._internal_queue.put_nowait((item, config))<EOL><DEDENT>else:<EOL><INDENT>compressed_item = self._compress_event(item)<EOL>for name, connector in self._connected_endpoints.items():<EOL><INDENT>allowed = (config is None) or config.allowed_to_receive(name)<EOL>if allowed:<EOL><INDENT>connector.put_nowait((compressed_item, config))<EOL><DEDENT><DEDENT><DEDENT>
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.