code: def test_reducescatter_different_dtype(
      ray_start_distributed_2_nodes, dtype, backend
  ):
      world_size = 8
      actors, _ = create_collective_workers(world_size, backend=backend)
      init_tensors_for_gather_scatter(actors, dtype=dtype)
      results = ray.get([a.do_reducescatter.remote() for a in actors])
      for i in range(world_size):
          for j in range(world_size):
              assert (
                  results[i] == np.ones(10, dtype=dtype) * world_size
              ).all()
  
file_path: ray/python/ray/util/collective/tests/distributed_cpu_tests/test_distributed_reducescatter.py
imports: import pytest
  import ray
  import numpy
  import torch
  from ray.util.collective.types import Backend
  from ray.util.collective.tests.cpu_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_reducescatter_different_dtype(ray_start_distributed_2_nodes, dtype, backend) without return types