code: def test_broadcast_different_name(
      ray_start_distributed_2_nodes_4_gpus, group_name, src_rank
  ):
      world_size = 4
      actors, _ = create_collective_workers(
          num_workers=world_size, group_name=group_name
      )
      ray.wait(
          [
              a.set_buffer.remote(
                  cp.ones((10,), dtype=cp.float32) * (i + 2)
              )
              for i, a in enumerate(actors)
          ]
      )
      results = ray.get(
          [
              a.do_broadcast.remote(
                  group_name=group_name, src_rank=src_rank
              )
              for a in actors
          ]
      )
      for i in range(world_size):
          assert (
              results[i]
              == cp.ones((10,), dtype=cp.float32) * (src_rank + 2)
          ).all()
  
file_path: ray/python/ray/util/collective/tests/distributed_gpu_tests/test_distributed_broadcast.py
imports: import pytest
  import cupy
  import ray
  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_broadcast_different_name(ray_start_distributed_2_nodes_4_gpus, group_name, src_rank) without return types