class_docstr: Dispatches events which attached plugins can react to.
docstr: Call all functions hooked to a certain event.
docstr_tok: ["Call","all","functions","hooked","to","a","certain","event","."]
code: def dispatch(self, event: EventIdenifier, *args, **kwargs) -> None:
      """Call all functions hooked to a certain event."""
      self.validate_event(event)
  
      self._event_queue.put((event, args, kwargs))
  
      if not self._processing_events:
          try:
              self._processing_events = True
  
              while not self._event_queue.empty():
                  event, args, kwargs = self._event_queue.get()
  
                  for hook in self._hook_handles[event].values():
                      hook(*args, **kwargs)
          finally:
              # Reset the flag, since an exception event might be dispatched
              self._processing_events = False
  
imports: import logging
  from collections import defaultdict
  from inspect import isclass, signature
  from itertools import count
  from queue import Queue
  from typing import Any, Callable, Dict, Iterator, List, NewType, Optional, Sequence, Set, Type, Union, cast
label_desc: Use image node_id 6 for calling the Pluggable obj's underlying member method code with example usage: obj.dispatch(event) without return types