code: def allgather(tensor_list: list, tensor, group_name: str = "default"):
      """Allgather tensors from each process of the group into a list.
  
      Args:
          tensor_list: the results, stored as a list of tensors.
          tensor: the tensor (to be gathered) in the current process
          group_name: the name of the collective group.
  
      Returns:
          None
      """
      _check_single_tensor_input(tensor)
      _check_tensor_list_input(tensor_list)
      g = _check_and_get_group(group_name)
      if len(tensor_list) != g.world_size:
          # Typically CLL lib requires len(tensor_list) >= world_size;
          # Here we make it more strict: len(tensor_list) == world_size.
          raise RuntimeError(
              "The length of the tensor list operands to allgather "
              "must be equal to world_size."
          )
      opts = types.AllGatherOptions()
      g.allgather([tensor_list], [tensor], opts)
  
imports: import logging
  import os
  from typing import List
  import numpy
  import ray
  from ray.util.collective import types
label_desc: Use image node_id 16 for calling a global function with example usage: allgather(tensor_list, tensor, group_name) without return types