class_docstr: Manage and provide access to all of the models that belong to a Bokeh
  Document.
  
  The set of "all models" means specifically all the models reachable from
  references form a Document's roots.
class_docstr_tok: ["Manage","and","provide","access","to","all","of","the","models","that","belong","to","a","Bokeh","Document",".","The","set","of","``","all","models","''","means","specifically","all","the","models","reachable","from","references","form","a","Document","'s","roots","."]
docstr: Provide callbacks to invoke if a bokeh event is received.
  
          
code: def on_event(
      self, event: str | type[Event], *callbacks: EventCallback
  ) -> None:
      """Provide callbacks to invoke if a bokeh event is received."""
      self._on_event(event, *callbacks)
  
imports: from __future__ import annotations
  import logging
  import weakref
  from collections import defaultdict
  from functools import wraps
  from typing import TYPE_CHECKING, Any, Callable
  from ..core.enums import HoldPolicy, HoldPolicyType
  from ..events import _CONCRETE_EVENT_CLASSES, DocumentEvent, Event, ModelEvent
  from ..model import Model
  from ..models.callbacks import Callback
  from ..util.callback_manager import _check_callback
  from .events import DocumentPatchedEvent, ModelChangedEvent, RootAddedEvent, RootRemovedEvent, SessionCallbackAdded, SessionCallbackRemoved, TitleChangedEvent
  from .locking import UnlockedDocumentProxy
label_desc: Use image node_id 13 for calling the DocumentCallbackManager obj's underlying member method code with example usage: obj.on_event(event) without return types