code: def test_allgather_different_dtype(
      ray_start_single_node_2_gpus, dtype
  ):
      world_size = 2
      actors, _ = create_collective_workers(world_size)
      init_tensors_for_gather_scatter(actors, dtype=dtype)
      results = ray.get([a.do_allgather.remote() for a in actors])
      for i in range(world_size):
          for j in range(world_size):
              assert (
                  results[i][j] == cp.ones(10, dtype=dtype) * (j + 1)
              ).all()
  
file_path: ray/python/ray/util/collective/tests/single_node_gpu_tests/test_allgather.py
imports: import pytest
  import ray
  import cupy
  import torch
  from ray.util.collective.tests.util import create_collective_workers, init_tensors_for_gather_scatter
label_desc: Use image node_id 2 for calling a global function with example usage: test_allgather_different_dtype(ray_start_single_node_2_gpus, dtype) without return types