code: def test_to_numpy_refs(ray_start_regular_shared):
      # Tensor Dataset
      ds = ray.data.range_tensor(10, parallelism=2)
      arr = np.concatenate(
          extract_values("data", ray.get(ds.to_numpy_refs()))
      )
      np.testing.assert_equal(arr, np.expand_dims(np.arange(0, 10), 1))
  
      # Table Dataset
      ds = ray.data.range(10)
      arr = np.concatenate(
          [t["id"] for t in ray.get(ds.to_numpy_refs())]
      )
      np.testing.assert_equal(arr, np.arange(0, 10))
  
      # Test multi-column Arrow dataset.
      ds = ray.data.from_arrow(
          pa.table({"a": [1, 2, 3], "b": [4, 5, 6]})
      )
      arrs = ray.get(ds.to_numpy_refs())
      np.testing.assert_equal(
          arrs, [{"a": np.array([1, 2, 3]), "b": np.array([4, 5, 6])}]
      )
  
      # Test multi-column Pandas dataset.
      ds = ray.data.from_pandas(
          pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
      )
      arrs = ray.get(ds.to_numpy_refs())
      np.testing.assert_equal(
          arrs, [{"a": np.array([1, 2, 3]), "b": np.array([4, 5, 6])}]
      )
  
imports: import os
  import numpy
  import pandas
  import pyarrow
  import pytest
  from pytest_lazyfixture import lazy_fixture
  import ray
  from ray.data.datasource import BaseFileMetadataProvider, FastFileMetadataProvider, Partitioning, PartitionStyle, PathPartitionFilter
  from ray.data.tests.conftest import *
  from ray.data.tests.mock_http_server import *
  from ray.data.tests.test_partitioning import PathPartitionEncoder
  from ray.data.tests.util import Counter, extract_values
  from ray.tests.conftest import *
label_desc: Use image node_id 4 for calling a global function with example usage: test_to_numpy_refs(ray_start_regular_shared) without return types