docstr: ...Test that generated sampled_y is correct
          
code: def test_sample_y(self):
      """...Test that generated sampled_y is correct"""
      for t_array, y_array, inter_mode in self.samples:
          tf = TimeFunction([t_array, y_array], inter_mode=inter_mode)
          # We remove last value as it is computed but not used
          created_sample_y = tf.sampled_y[:-1]
  
          sampled_times = t_array[0] + tf.dt * np.arange(
              len(created_sample_y)
          )
  
          true_sample_y = dichotomic_value(
              sampled_times, t_array, y_array, inter_mode=inter_mode
          )
  
          np.testing.assert_almost_equal(
              created_sample_y, true_sample_y
          )
  
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 2 for calling the Test obj's underlying member method code with example usage: obj.test_sample_y() without return types