code: def asserts(self, fn, msg_or_fn):
          ''' 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 asserts(self, fn, msg_or_fn):
          ''' 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
docs: 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