class_docstr: Base class for Bokeh property instances, which can be added to Bokeh
  Models.
  
  Args:
      default (obj, optional) :
          A default value for attributes created from this property to have.
  
      help (str or None, optional) :
          A documentation string for this property. It will be automatically
          used by the :ref:`bokeh.sphinxext.bokeh_prop` extension when
          generating Spinx documentation. (default: None)
class_docstr_tok: ["Base","class","for","Bokeh","property","instances",",","which","can","be","added","to","Bokeh","Models",".","Args",":","default","(","obj",",","optional",")",":","A","default","value","for","attributes","created","from","this","property","to","have",".","help","(","str","or","None",",","optional",")",":","A","documentation","string","for","this","property",".","It","will","be","automatically","used","by","the",":","ref",":","`","bokeh.sphinxext.bokeh_prop","`","extension","when","generating","Spinx","documentation",".","(","default",":","None",")"]
docstr: Assert that prepared values satisfy given conditions.
  
  Assertions are intended in enforce conditions beyond simple value
  type validation. For instance, this method can be use to assert that
  the columns of a ``ColumnDataSource`` all collectively have the same
  length at all times.
  
  Args:
      fn (callable) :
          A function accepting ``(obj, value)`` that returns True if the value
          passes the assertion, or False otherwise.
  
      msg_or_fn (str or callable) :
          A message to print in case the assertion fails, or a function
          accepting ``(obj, name, value)`` to call in in case the assertion
          fails.
  
  Returns:
      self
docstr_tok: ["Assert","that","prepared","values","satisfy","given","conditions",".","Assertions","are","intended","in","enforce","conditions","beyond","simple","value","type","validation",".","For","instance",",","this","method","can","be","use","to","assert","that","the","columns","of","a","``","ColumnDataSource","``","all","collectively","have","the","same","length","at","all","times",".","Args",":","fn","(","callable",")",":","A","function","accepting","``","(","obj",",","value",")","``","that","returns","True","if","the","value","passes","the","assertion",",","or","False","otherwise",".","msg_or_fn","(","str","or","callable",")",":","A","message","to","print","in","case","the","assertion","fails",",","or","a","function","accepting","``","(","obj",",","name",",","value",")","``","to","call","in","in","case","the","assertion","fails",".","Returns",":","self"]
code: def asserts(
      self,
      fn: Callable[[HasProps, T], bool],
      msg_or_fn: str | Callable[[HasProps, str, T], None],
  ) -> Property[T]:
      """Assert that prepared values satisfy given conditions.
  
      Assertions are intended in enforce conditions beyond simple value
      type validation. For instance, this method can be use to assert that
      the columns of a ``ColumnDataSource`` all collectively have the same
      length at all times.
  
      Args:
          fn (callable) :
              A function accepting ``(obj, value)`` that returns True if the value
              passes the assertion, or False otherwise.
  
          msg_or_fn (str or callable) :
              A message to print in case the assertion fails, or a function
              accepting ``(obj, name, value)`` to call in in case the assertion
              fails.
  
      Returns:
          self
  
      """
      self.assertions.append((fn, msg_or_fn))
      return self
  
imports: from __future__ import annotations
  import logging
  from copy import copy
  from typing import TYPE_CHECKING, Any, Callable, ClassVar, TypeVar, Union
  from ...util.dependencies import uses_pandas
  from ...util.strings import nice_join
  from ..has_props import HasProps
  from ._sphinx import property_link, register_type_link, type_link
  from .descriptor_factory import PropertyDescriptorFactory
  from .descriptors import PropertyDescriptor
  from .singletons import Intrinsic, IntrinsicType, Undefined, UndefinedType
label_desc: Use image node_id 24 for calling the Property obj's underlying member method code with example usage: obj.asserts(fn, msg_or_fn) and returns: self