class_docstr: A base class for Bokeh properties with simple get/set and serialization
  behavior.
class_docstr_tok: ["A","base","class","for","Bokeh","properties","with","simple","get\/set","and","serialization","behavior","."]
docstr: Internal implementation helper to set property values.
  
  This function handles bookkeeping around noting whether values have
  been explicitly set, etc.
  
  Args:
      obj (HasProps)
          The object the property is being set on.
  
      old (obj) :
          The previous value of the property to compare
  
      hint (event hint or None, optional)
          An optional update event hint, e.g. ``ColumnStreamedEvent``
          (default: None)
  
          Update event hints are usually used at times when better
          update performance can be obtained by special-casing in
          some way (e.g. streaming or patching column data sources)
  
      setter (ClientSession or ServerSession or None, optional) :
          This is used to prevent "boomerang" updates to Bokeh apps.
          (default: None)
  
          In the context of a Bokeh server application, incoming updates
          to properties will be annotated with the session that is
          doing the updating. This value is propagated through any
          subsequent change notifications that the update triggers.
          The session can compare the event setter to itself, and
          suppress any updates that originate from itself.
  
  Returns:
      None
code: def _set(
      self,
      obj: HasProps,
      old: Any,
      value: Any,
      *,
      hint: DocumentPatchedEvent | None = None,
      setter: Setter | None = None,
  ) -> None:
      """Internal implementation helper to set property values.
  
      This function handles bookkeeping around noting whether values have
      been explicitly set, etc.
  
      Args:
          obj (HasProps)
              The object the property is being set on.
  
          old (obj) :
              The previous value of the property to compare
  
          hint (event hint or None, optional)
              An optional update event hint, e.g. ``ColumnStreamedEvent``
              (default: None)
  
              Update event hints are usually used at times when better
              update performance can be obtained by special-casing in
              some way (e.g. streaming or patching column data sources)
  
          setter (ClientSession or ServerSession or None, optional) :
              This is used to prevent "boomerang" updates to Bokeh apps.
              (default: None)
  
              In the context of a Bokeh server application, incoming updates
              to properties will be annotated with the session that is
              doing the updating. This value is propagated through any
              subsequent change notifications that the update triggers.
              The session can compare the event setter to itself, and
              suppress any updates that originate from itself.
  
      Returns:
          None
  
      """
      if value is Undefined:
          raise RuntimeError(
              "internal error attempting to set Undefined value"
          )
  
      # Normally we want a "no-op" if the new value and old value are identical
      # but some hinted events are in-place. This check will allow those cases
      # to continue on to the notification machinery
      if self.property.matches(value, old) and (hint is None):
          return
  
      was_set = self.name in obj._property_values
  
      # "old" is the logical old value, but it may not be the actual current
      # attribute value if our value was mutated behind our back and we got
      # _notify_mutated.
      old_attr_value = (
          obj._property_values[self.name] if was_set else old
      )
  
      if old_attr_value is not value:
          if isinstance(old_attr_value, PropertyValueContainer):
              old_attr_value._unregister_owner(obj, self)
          self._set_value(obj, value)
  
      # for notification purposes, "old" should be the logical old
      self._trigger(obj, old, value, hint=hint, setter=setter)
  
imports: from __future__ import annotations
  import logging
  from copy import copy
  from types import FunctionType
  from typing import TYPE_CHECKING, Any, Callable, Generic, TypeVar
  from ...util.deprecation import deprecated
  from .singletons import Undefined
  from .wrappers import PropertyValueColumnData, PropertyValueContainer
label_desc: Use image node_id 19 for calling the PropertyDescriptor obj's underlying member method code with example usage: obj._set(obj, old, value) without return types