code: def test_iter_torch_batches_tensor_ds(ray_start_10_cpus_shared):
      arr1 = np.arange(12).reshape((3, 2, 2))
      arr2 = np.arange(12, 24).reshape((3, 2, 2))
      arr = np.concatenate((arr1, arr2))
      ds = ray.data.from_numpy([arr1, arr2])
  
      num_epochs = 2
      for _ in range(num_epochs):
          iterations = []
          for batch in ds.iter_torch_batches(batch_size=2):
              iterations.append(batch["data"].numpy())
          combined_iterations = np.concatenate(iterations)
          np.testing.assert_array_equal(arr, combined_iterations)
  
file_path: ray/python/ray/data/tests/test_torch.py
imports: import numpy
  import pandas
  import pytest
  import ray
  from ray.data.extensions.tensor_extension import TensorArray
  from ray.data.tests.conftest import *
  from ray.tests.conftest import *
label_desc: Use image node_id 7 for calling a global function with example usage: test_iter_torch_batches_tensor_ds(ray_start_10_cpus_shared) without return types