code: def test_allreduce_different_name(
      ray_start_distributed_2_nodes_4_gpus, group_name, world_size
  ):
      actors, _ = create_collective_workers(
          num_workers=world_size, group_name=group_name
      )
      results = ray.get(
          [a.do_allreduce.remote(group_name) for a in actors]
      )
      assert (
          results[0] == cp.ones((10,), dtype=cp.float32) * world_size
      ).all()
      assert (
          results[1] == cp.ones((10,), dtype=cp.float32) * world_size
      ).all()
  
file_path: ray/python/ray/util/collective/tests/distributed_gpu_tests/test_distributed_allreduce.py
imports: import pytest
  import ray
  from ray.util.collective.types import ReduceOp
  import cupy
  import torch
  from ray.util.collective.tests.util import create_collective_workers
label_desc: Use image node_id 1 for calling a global function with example usage: test_allreduce_different_name(ray_start_distributed_2_nodes_4_gpus, group_name, world_size) without return types