code: def test_reduce_invalid_rank(
      ray_start_single_node, backend, dst_rank=3
  ):
      world_size = 2
      actors, _ = create_collective_workers(world_size, backend=backend)
      with pytest.raises(ValueError):
          ray.get(
              [a.do_reduce.remote(dst_rank=dst_rank) for a in actors]
          )
  
file_path: ray/python/ray/util/collective/tests/single_node_cpu_tests/test_reduce.py
imports: import pytest
  import numpy
  import ray
  from ray.util.collective.types import Backend, ReduceOp
  from ray.util.collective.tests.cpu_util import create_collective_workers
label_desc: Use image node_id 6 for calling a global function with example usage: test_reduce_invalid_rank(ray_start_single_node, backend, dst_rank) without return types