code: def test_batch_tensors(ray_start_regular_shared):
      import torch
  
      ds = ray.data.from_items(
          [torch.tensor([0, 0]) for _ in range(40)], parallelism=40
      )
      res = (
          "MaterializedDataset(\n"
          "   num_blocks=40,\n"
          "   num_rows=40,\n"
          "   schema={item: numpy.ndarray(shape=(2,), dtype=int64)}\n"
          ")"
      )
      assert str(ds) == res, str(ds)
      df = next(iter(ds.iter_batches(batch_format="pandas")))
      assert df.to_dict().keys() == {"item"}
  
imports: import time
  import numpy
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.air.util.tensor_extensions.utils import _create_possibly_ragged_ndarray
  from ray.data.block import BlockAccessor
  from ray.data.extensions.tensor_extension import ArrowTensorArray, ArrowTensorType, ArrowVariableShapedTensorArray, ArrowVariableShapedTensorType, TensorArray, TensorDtype
  from ray.data.tests.conftest import *
  from ray.data.tests.util import extract_values
  from ray.tests.conftest import *
label_desc: Use image node_id 3 for calling a global function with example usage: test_batch_tensors(ray_start_regular_shared) without return types