code: def test_reduce_different_name(
      ray_start_single_node, group_name, dst_rank, backend
  ):
      world_size = 2
      actors, _ = create_collective_workers(
          num_workers=world_size, group_name=group_name, backend=backend
      )
      results = ray.get(
          [a.do_reduce.remote(group_name, dst_rank) for a in actors]
      )
      for i in range(world_size):
          if i == dst_rank:
              assert (
                  results[i]
                  == np.ones((10,), dtype=np.float32) * world_size
              ).all()
          else:
              assert (
                  results[i] == np.ones((10,), dtype=np.float32)
              ).all()
  
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 1 for calling a global function with example usage: test_reduce_different_name(ray_start_single_node, group_name, dst_rank, backend) without return types