code: def test_error(self):
      batch_size = 10
      epochs = 2
      x = np.array(np.random.uniform(size=(100, 32, 32, 3)))
      dataset = tf.data.Dataset.from_tensor_slices(x)
      dataset = dataset.batch(batch_size)
  
      data_adapter = TFDatasetAdapter(dataset, steps=None)
  
      num_steps = math.ceil(x.shape[0] / batch_size) * epochs
      iterator_fn = data_adapter.get_dataset()
      iterator = iterator_fn()
  
      with self.assertRaises(StopIteration):
          for i in range(num_steps):
              batch = next(iterator)
              batch_x = batch
              assert batch_x.shape == (batch_size, *x.shape[1:])
              np.testing.assert_array_equal(
                  batch_x, x[i * batch_size : (i + 1) * batch_size]
              )
  
file_path: elegy/tests/data/tf_dataset_adapter_test.py
imports: import math
  from unittest import TestCase
  import jax.numpy
  import numpy
  import tensorflow
  from elegy.data.tf_dataset_adapter import TFDatasetAdapter
label_desc: Use image node_id 3 for calling the ArrayDataAdapterTest obj's underlying member method code with example usage: obj.test_error() without return types