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