code: def test_register_arrow_types(tmp_path):
      # Test that our custom arrow extension types are registered on initialization.
      ds = ray.data.from_items(np.zeros((8, 8, 8), dtype=np.int64))
      tmp_file = f"{tmp_path}/test.parquet"
      ds.write_parquet(tmp_file)
  
      ds = ray.data.read_parquet(tmp_file)
      schema = "Column  Type\n------  ----\nitem    numpy.ndarray(shape=(8, 8), dtype=int64)"
      assert str(ds.schema()) == schema
  
      # Also run in driver script to eliminate existing imports.
      driver_script = """import ray
  ds = ray.data.read_parquet("{0}")
  schema = ds.schema()
  assert str(schema) == \"\"\"{1}\"\"\"
  """.format(
          tmp_file, schema
      )
      run_string_as_driver(driver_script)
  
file_path: ray/python/ray/data/tests/test_arrow_block.py
imports: import numpy
  import pyarrow
  import pytest
  import ray
  from ray._private.test_utils import run_string_as_driver
  from ray.data._internal.arrow_block import ArrowBlockAccessor
label_desc: Use image node_id 2 for calling a global function with example usage: test_register_arrow_types(tmp_path) without return types