code: def test_allreduce_different_dtype(
      ray_start_distributed_2_nodes, dtype, backend
  ):
      world_size = 8
      actors, _ = create_collective_workers(world_size, backend=backend)
      ray.wait(
          [
              a.set_buffer.remote(np.ones(10, dtype=dtype))
              for a in actors
          ]
      )
      results = ray.get([a.do_allreduce.remote() for a in actors])
      assert (
          results[0] == np.ones((10,), dtype=dtype) * world_size
      ).all()
      assert (
          results[1] == np.ones((10,), dtype=dtype) * world_size
      ).all()
  
file_path: ray/python/ray/util/collective/tests/distributed_cpu_tests/test_distributed_allreduce.py
imports: import pytest
  import ray
  from ray.util.collective.types import ReduceOp
  import numpy
  import torch
  from ray.util.collective.types import Backend
  from ray.util.collective.tests.cpu_util import create_collective_workers
label_desc: Use image node_id 6 for calling a global function with example usage: test_allreduce_different_dtype(ray_start_distributed_2_nodes, dtype, backend) without return types