code: def test_reduce_different_name(
      ray_start_single_node, group_name, array_size, dst_rank, backend
  ):
      world_size = 2
      actors, _ = create_collective_workers(
          num_workers=world_size, group_name=group_name, backend=backend
      )
      ray.wait(
          [
              a.set_buffer.remote(
                  np.ones(array_size, dtype=np.float32) * (i + 1)
              )
              for i, a in enumerate(actors)
          ]
      )
      src_rank = 1 - dst_rank
      refs = []
      for i, actor in enumerate(actors):
          if i != dst_rank:
              ref = actor.do_send.remote(group_name, dst_rank)
          else:
              ref = actor.do_recv.remote(group_name, src_rank)
          refs.append(ref)
      results = ray.get(refs)
      for i in range(world_size):
          assert (
              results[i]
              == np.ones(array_size, dtype=np.float32) * (src_rank + 1)
          ).all()
  
file_path: ray/python/ray/util/collective/tests/single_node_cpu_tests/test_sendrecv.py
imports: import pytest
  import numpy
  import ray
  from ray.util.collective.types import Backend
  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, array_size, dst_rank, backend) without return types