code: def test_errors(ray_start_regular_shared):
      ds = ray.data.range(10)
      with pytest.raises(ValueError):
          ds.to_random_access_dataset("invalid")
  
file_path: ray/python/ray/data/tests/test_random_access.py
imports: import pyarrow
  import pytest
  import ray
  from ray.tests.conftest import *
label_desc: Use image node_id 3 for calling a global function with example usage: test_errors(ray_start_regular_shared) without return types