code: def init_tensors_for_gather_scatter_multigpu(
      actors, array_size=10, tensor_backend="cupy"
  ):
      for i, a in enumerate(actors):
          if tensor_backend == "cupy":
              ray.get([a.set_buffer.remote(array_size)])
              ray.get([a.set_list_buffer.remote(array_size)])
          elif tensor_backend == "torch":
              ray.get(
                  [
                      a.set_buffer.remote(
                          array_size,
                          tensor_type0="torch",
                          tensor_type1="torch",
                      )
                  ]
              )
              ray.get(
                  [
                      a.set_list_buffer.remote(
                          array_size,
                          tensor_type0="torch",
                          tensor_type1="torch",
                      )
                  ]
              )
          else:
              raise RuntimeError("Unsupported tensor backend.")
  
imports: import cupy
  import logging
  import ray
  import ray.util.collective
  from ray.util.collective.types import Backend, ReduceOp
  from ray.util.collective.collective_group.nccl_util import get_num_gpus
  import torch
label_desc: Use image node_id 4 for calling a global function with example usage: init_tensors_for_gather_scatter_multigpu(actors, array_size, tensor_backend) without return types