class_docstr: Base class for all objects stored in Bokeh |Document| instances.
  
      
class_docstr_tok: ["Base","class","for","all","objects","stored","in","Bokeh","|Document|","instances","."]
docstr: Attach a model to a Bokeh |Document|.
  
  This private interface should only ever called by the Document
  implementation to set the private ._document field properly
code: def _attach_document(self, doc: Document) -> None:
      """Attach a model to a Bokeh |Document|.
  
      This private interface should only ever called by the Document
      implementation to set the private ._document field properly
  
      """
      if self.document is doc:  # nothing to do
          return
  
      if self.document is not None:
          raise RuntimeError(
              f"Models must be owned by only a single document, {self!r} is already in a doc"
          )
  
      doc.theme.apply_to_model(self)
      self.document = doc
      self._update_event_callbacks()
  
imports: from __future__ import annotations
  import logging
  from inspect import Parameter, Signature, isclass
  from typing import TYPE_CHECKING, Any, Iterable
  from ..core import properties
  from ..core.has_props import HasProps, _default_resolver, abstract
  from ..core.property._sphinx import type_link
  from ..core.property.validation import without_property_validation
  from ..core.serialization import ObjectRefRep, Ref, Serializer
  from ..core.types import ID
  from ..events import Event
  from ..themes import default
  from ..util.callback_manager import EventCallbackManager, PropertyCallbackManager
  from ..util.serialization import make_id
  from .docs import html_repr, process_example
  from .util import HasDocumentRef, collect_models, visit_value_and_its_immediate_references
label_desc: Use image node_id 19 for calling the Model obj's underlying member method code with example usage: obj._attach_document(doc) without return types