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: Args:
      document (Document): A Document to manage models for
          A weak reference to the Document will be retained
code: def __init__(self, document: Document):
      """
  
      Args:
          document (Document): A Document to manage models for
              A weak reference to the Document will be retained
  
      """
      self._document = weakref.ref(document)
  
      self._change_callbacks = {}
      self._event_callbacks = defaultdict(list)
      self._js_event_callbacks = defaultdict(list)
      self._message_callbacks = defaultdict(list)
      self._session_destroyed_callbacks = set()
      self._session_callbacks = set()
  
      self._subscribed_models = defaultdict(set)
  
      self._hold = None
      self._held_events = []
  
      self.on_message("bokeh_event", self.trigger_event)
  
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 1 to create a new DocumentCallbackManager object  with example: obj = DocumentCallbackManager(document)