class_docstr: Base observer.
class_docstr_tok: ["Base","observer","."]
code: def dispatch_events(self, event_queue, timeout):
      event, watch = event_queue.get(block=True, timeout=timeout)
  
      with self._lock:
          # To allow unschedule/stop and safe removal of event handlers
          # within event handlers itself, check if the handler is still
          # registered after every dispatch.
          for handler in list(self._handlers.get(watch, [])):
              if handler in self._handlers.get(watch, []):
                  handler.dispatch(event)
      event_queue.task_done()
  
imports: from __future__ import with_statement
  import threading
  from wandb_watchdog.utils import BaseThread
  from wandb_watchdog.utils.compat import queue
  from wandb_watchdog.utils.bricks import SkipRepeatsQueue
label_desc: Use image node_id 15 for calling the BaseObserver obj's underlying member method code with example usage: obj.dispatch_events(event_queue, timeout) without return types