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","."]
code: def trigger(
      self,
      attr: str,
      old: Any,
      new: Any,
      hint: DocumentPatchedEvent | None = None,
      setter: Setter | None = None,
  ) -> None:
      """ """
  
      # The explicit assumption here is that hinted events do not need to
      # go through all the same invalidation steps. Currently this is the
      # case for ColumnsStreamedEvent and ColumnsPatchedEvent. However,
      # this may need to be further refined in the future, if the
      # assumption does not hold for future hinted events (e.g. the hint
      # could specify explicitly whether to do normal invalidation or not)
      if hint is None:
          dirty_count = 0
  
          def mark_dirty(_: HasProps):
              nonlocal dirty_count
              dirty_count += 1
  
          if self._document is not None:
              visit_value_and_its_immediate_references(new, mark_dirty)
              visit_value_and_its_immediate_references(old, mark_dirty)
              if dirty_count > 0:
                  self.document.models.invalidate()
      # chain up to invoke callbacks
      descriptor = self.lookup(attr)
      super().trigger(
          descriptor.name, old, new, hint=hint, setter=setter
      )
  
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 18 for calling the Model obj's underlying member method code with example usage: obj.trigger(attr, old, new, hint, setter) without return types