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: Called by Model when it changes
  
          
code: def notify_change(
      self,
      model: Model,
      attr: str,
      old: Any,
      new: Any,
      hint: DocumentPatchedEvent | None = None,
      setter: Setter | None = None,
      callback_invoker: Invoker | None = None,
  ) -> None:
      """Called by Model when it changes"""
      doc = self._document()
      if doc is None:
          return
  
      # if name changes, need to update by-name index
      if attr == "name":
          doc.models.update_name(model, old, new)
  
      event: DocumentPatchedEvent
      if hint is None:
          new = model.lookup(attr).get_value(model)
          event = ModelChangedEvent(
              doc, model, attr, new, setter, callback_invoker
          )
      else:
          assert hint.callback_invoker is None
          hint.callback_invoker = callback_invoker
  
          if hint.setter is None:
              hint.setter = setter
  
          event = hint
  
      self.trigger_on_change(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 9 for calling the DocumentCallbackManager obj's underlying member method code with example usage: obj.notify_change(model, attr, old, new, hint, setter, callback_invoker) without return types