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: Remove a callback added earlier with ``add_periodic_callback``,
  ``add_timeout_callback``, or ``add_next_tick_callback``.
  
  Returns:
      None
  
  Raises:
      KeyError, if the callback was never added
code: def remove_session_callback(
      self, callback_obj: SessionCallback
  ) -> None:
      """Remove a callback added earlier with ``add_periodic_callback``,
      ``add_timeout_callback``, or ``add_next_tick_callback``.
  
      Returns:
          None
  
      Raises:
          KeyError, if the callback was never added
  
      """
      try:
          callback_objs = [callback_obj]
          self._session_callbacks.remove(callback_obj)
      except KeyError:
          raise ValueError(
              "callback already ran or was already removed, cannot be removed again"
          )
  
      doc = self._document()
      if doc is None:
          return
  
      # emit event so the session is notified and can remove the callback
      for callback_obj in callback_objs:
          self.trigger_on_change(
              SessionCallbackRemoved(doc, callback_obj)
          )
  
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 20 for calling the DocumentCallbackManager obj's underlying member method code with example usage: obj.remove_session_callback(callback_obj) without return types