code: def test_timeseries_regression(self):
      # Test simple timeseries regression use case
      data = np.arange(10)
      offset = 3
      targets = data[offset:]
      dataset = timeseries_dataset_utils.timeseries_dataset_from_array(
          data, targets, sequence_length=offset, batch_size=1
      )
      i = 0
      for batch in dataset:
          self.assertLen(batch, 2)
          inputs, targets = batch
          self.assertEqual(inputs.shape, (1, 3))
          # Check values
          self.assertAllClose(targets[0], data[offset + i])
          self.assertAllClose(inputs[0], data[i : i + offset])
          i += 1
      self.assertEqual(i, 7)
  
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 2 for calling the TimeseriesDatasetTest obj's underlying member method code with example usage: obj.test_timeseries_regression() without return types