code: def test_to_torch(ray_start_10_cpus_shared):
      import torch
  
      df1 = pd.DataFrame(
          {
              "one": [1, 2, 3],
              "two": [1.0, 2.0, 3.0],
              "label": [1.0, 2.0, 3.0],
          }
      )
      df2 = pd.DataFrame(
          {
              "one": [4, 5, 6],
              "two": [4.0, 5.0, 6.0],
              "label": [4.0, 5.0, 6.0],
          }
      )
      df3 = pd.DataFrame(
          {"one": [7, 8], "two": [7.0, 8.0], "label": [7.0, 8.0]}
      )
      df = pd.concat([df1, df2, df3])
      ds = ray.data.from_pandas([df1, df2, df3])
      torchd = ds.to_torch(label_column="label", batch_size=3)
  
      num_epochs = 2
      for _ in range(num_epochs):
          iterations = []
          for batch in iter(torchd):
              iterations.append(
                  torch.cat((batch[0], batch[1]), dim=1).numpy()
              )
          combined_iterations = np.concatenate(iterations)
          np.testing.assert_array_equal(
              np.sort(df.values), np.sort(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 1 for calling a global function with example usage: test_to_torch(ray_start_10_cpus_shared) without return types