code: def test_errors(self):
      # bad start index
      with self.assertRaisesRegex(ValueError, "`start_index` must be "):
          _ = timeseries_dataset_utils.timeseries_dataset_from_array(
              np.arange(10), None, 3, start_index=-1
          )
      with self.assertRaisesRegex(ValueError, "`start_index` must be "):
          _ = timeseries_dataset_utils.timeseries_dataset_from_array(
              np.arange(10), None, 3, start_index=11
          )
      # bad end index
      with self.assertRaisesRegex(ValueError, "`end_index` must be "):
          _ = timeseries_dataset_utils.timeseries_dataset_from_array(
              np.arange(10), None, 3, end_index=-1
          )
      with self.assertRaisesRegex(ValueError, "`end_index` must be "):
          _ = timeseries_dataset_utils.timeseries_dataset_from_array(
              np.arange(10), None, 3, end_index=11
          )
      # bad sampling_rate
      with self.assertRaisesRegex(
          ValueError, "`sampling_rate` must be "
      ):
          _ = timeseries_dataset_utils.timeseries_dataset_from_array(
              np.arange(10), None, 3, sampling_rate=0
          )
      # bad sequence stride
      with self.assertRaisesRegex(
          ValueError, "`sequence_stride` must be "
      ):
          _ = timeseries_dataset_utils.timeseries_dataset_from_array(
              np.arange(10), None, 3, sequence_stride=0
          )
  
file_path: keras/keras/utils/timeseries_dataset_utils_test.py
imports: import numpy
  from keras import testing
  from keras.utils import timeseries_dataset_utils
label_desc: Use image node_id 8 for calling the TimeseriesDatasetTest obj's underlying member method code with example usage: obj.test_errors() without return types