code: def test_basics(self):
      # Test ordering, targets, sequence length, batch size
      data = np.arange(100)
      targets = data * 2
      dataset = timeseries_dataset_utils.timeseries_dataset_from_array(
          data, targets, sequence_length=9, batch_size=5
      )
      # Expect 19 batches
      for i, batch in enumerate(dataset):
          self.assertLen(batch, 2)
          inputs, targets = batch
          if i < 18:
              self.assertEqual(inputs.shape, (5, 9))
          if i == 18:
              # Last batch: size 2
              self.assertEqual(inputs.shape, (2, 9))
          # Check target values
          self.assertAllClose(targets, inputs[:, 0] * 2)
          for j in range(min(5, len(inputs))):
              # Check each sample in the batch
              self.assertAllClose(
                  inputs[j], np.arange(i * 5 + j, i * 5 + j + 9)
              )
  
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 1 for calling the TimeseriesDatasetTest obj's underlying member method code with example usage: obj.test_basics() without return types