class_docstr: Base class for all class types that have Bokeh properties.
  
      
class_docstr_tok: ["Base","class","for","all","class","types","that","have","Bokeh","properties","."]
docstr: Apply a set of theme values which will be used rather than
  defaults, but will not override application-set values.
  
  The passed-in dictionary may be kept around as-is and shared with
  other instances to save memory (so neither the caller nor the
  |HasProps| instance should modify it).
  
  Args:
      property_values (dict) : theme values to use in place of defaults
  
  Returns:
      None
docstr_tok: ["Apply","a","set","of","theme","values","which","will","be","used","rather","than","defaults",",","but","will","not","override","application-set","values",".","The","passed-in","dictionary","may","be","kept","around","as-is","and","shared","with","other","instances","to","save","memory","(","so","neither","the","caller","nor","the","|HasProps|","instance","should","modify","it",")",".","Args",":","property_values","(","dict",")",":","theme","values","to","use","in","place","of","defaults","Returns",":","None"]
code: def apply_theme(self, property_values: dict[str, Any]) -> None:
      """Apply a set of theme values which will be used rather than
      defaults, but will not override application-set values.
  
      The passed-in dictionary may be kept around as-is and shared with
      other instances to save memory (so neither the caller nor the
      |HasProps| instance should modify it).
  
      Args:
          property_values (dict) : theme values to use in place of defaults
  
      Returns:
          None
  
      """
      old_dict = self.themed_values()
  
      # if the same theme is set again, it should reuse the same dict
      if old_dict is property_values:  # lgtm [py/comparison-using-is]
          return
  
      removed: set[str] = set()
      # we're doing a little song-and-dance to avoid storing __themed_values__ or
      # an empty dict, if there's no theme that applies to this HasProps instance.
      if old_dict is not None:
          removed.update(set(old_dict.keys()))
      added = set(property_values.keys())
      old_values: dict[str, Any] = {}
      for k in added.union(removed):
          old_values[k] = getattr(self, k)
  
      if len(property_values) > 0:
          setattr(self, "__themed_values__", property_values)
      elif hasattr(self, "__themed_values__"):
          delattr(self, "__themed_values__")
  
      # Property container values might be cached even if unmodified. Invalidate
      # any cached values that are not modified at this point.
      for k, v in old_values.items():
          if k in self._unstable_themed_values:
              del self._unstable_themed_values[k]
  
      # Emit any change notifications that result
      for k, v in old_values.items():
          descriptor = self.lookup(k)
          if isinstance(descriptor, PropertyDescriptor):
              descriptor.trigger_if_changed(self, v)
  
imports: from __future__ import annotations
  import logging
  import difflib
  from typing import TYPE_CHECKING, Any, Callable, ClassVar, Iterable, Literal, NoReturn, TypedDict, TypeVar, Union, overload
  from weakref import WeakSet
  from ..util.strings import append_docstring, nice_join
  from ..util.warnings import warn
  from .property.descriptor_factory import PropertyDescriptorFactory
  from .property.descriptors import PropertyDescriptor, UnsetValueError
  from .property.override import Override
  from .property.singletons import Intrinsic, Undefined
  from .property.wrappers import PropertyValueContainer
  from .serialization import ObjectRep, Ref, Serializable, Serializer
  from .types import ID
label_desc: Use image node_id 24 for calling the HasProps obj's underlying member method code with example usage: obj.apply_theme(property_values) without return types