docstr: ...Test that TimeFunction returns correct values on randomly
  selected times
code: def test_values(self):
      """...Test that TimeFunction returns correct values on randomly
      selected times
      """
      for t_array, y_array, inter_mode in self.samples:
          # take random t on TimeFunction support
          t_inside_support = np.random.uniform(
              t_array[0], t_array[-1], 10
          )
          t_before_support = np.random.uniform(
              t_array[0] - 4, t_array[0], 5
          )
          t_after_support = np.random.uniform(
              t_array[-1], t_array[-1] + 4, 5
          )
  
          test_t = np.hstack(
              (
                  t_before_support,
                  t_inside_support,
                  t_after_support,
                  t_array,
              )
          )
          true_values = dichotomic_value(
              test_t, t_array, y_array, inter_mode=inter_mode
          )
  
          tf = TimeFunction([t_array, y_array], inter_mode=inter_mode)
          tf_values = tf.value(test_t)
          errors = np.abs(true_values - tf_values)
  
          # If we do not find the same value ensure that the error is
          # controlled by max_error
          different_values = errors > 1e-6
  
          for t, error in zip(
              test_t[different_values], errors[different_values]
          ):
              if inter_mode == TimeFunction.InterLinear:
                  self.assertLess(error, tf._max_error(t))
              else:
                  distance_point = np.array(t - t_array).min()
                  self.assertLess(distance_point, tf.dt)
  
file_path: tick/tick/base/tests/time_func_test.py
imports: import unittest
  import itertools
  import numpy
  from tick.base import TimeFunction
label_desc: Use image node_id 3 for calling the Test obj's underlying member method code with example usage: obj.test_values() without return types