class_docstr: A mixin class to provide an interface for registering and
  triggering event callbacks on the Python side.
class_docstr_tok: ["A","mixin","class","to","provide","an","interface","for","registering","and","triggering","event","callbacks","on","the","Python","side","."]
code: def _trigger_event(self, event: ModelEvent) -> None:
      def invoke() -> None:
          for callback in self._event_callbacks.get(
              event.event_name, []
          ):
              if event.model is not None and self.id == event.model.id:
                  if _nargs(callback) == 0:
                      cast(EventCallbackWithoutEvent, callback)()
                  else:
                      cast(EventCallbackWithEvent, callback)(event)
  
      if self.document is not None:
          from ..model import Model
  
          self.document.callbacks.notify_event(
              cast(Model, self), event, invoke
          )
      else:
          invoke()
  
file_path: bokeh/src/bokeh/util/callback_manager.py
imports: from __future__ import annotations
  import logging
  from collections import defaultdict
  from inspect import signature
  from typing import TYPE_CHECKING, Any, Callable, Sequence, Union, cast
  from ..events import Event, ModelEvent
  from ..util.functions import get_param_info
label_desc: Use image node_id 3 for calling the EventCallbackManager obj's underlying member method code with example usage: obj._trigger_event(event) without return types