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