docstr: Allgather tensors across gpus into a list of tensors.
  
  Args:
      tensor_lists (List[List[Tensor]]): allgathered tensors.
      tensors: the list of tensors to allgather across the group.
               Each tensor must lolcate on a GPU of the process.
      allgather_options: allgather options.
  
  Returns:
      None
docstr_tok: ["Allgather","tensors","across","gpus","into","a","list","of","tensors",".","Args",":","tensor_lists","(","List","[","List","[","Tensor","]","]",")",":","allgathered","tensors",".","tensors",":","the","list","of","tensors","to","allgather","across","the","group",".","Each","tensor","must","lolcate","on","a","GPU","of","the","process",".","allgather_options",":","allgather","options",".","Returns",":","None"]
code: def allgather(
      self, tensor_lists, tensors, allgather_options=AllGatherOptions()
  ):
      """Allgather tensors across gpus into a list of tensors.
  
      Args:
          tensor_lists (List[List[Tensor]]): allgathered tensors.
          tensors: the list of tensors to allgather across the group.
                   Each tensor must lolcate on a GPU of the process.
          allgather_options: allgather options.
  
      Returns:
          None
      """
  
      def collective_fn(input_tensor, output_tensor, comm, stream):
          comm.allGather(
              nccl_util.get_tensor_ptr(input_tensor),
              nccl_util.get_tensor_ptr(output_tensor),
              nccl_util.get_tensor_n_elements(input_tensor),
              nccl_util.get_nccl_tensor_dtype(input_tensor),
              stream.ptr,
          )
  
      _check_inputs_compatibility_for_scatter_gather(
          tensors, tensor_lists
      )
      output_flattened = [
          _flatten_for_scatter_gather(tensor_list, copy=False)
          for tensor_list in tensor_lists
      ]
  
      def postprocess_fn(stream):
          # TODO(Hao): designate a copy stream.
          for i, tensor_list in enumerate(tensor_lists):
              for j, tensor in enumerate(tensor_list):
                  nccl_util.copy_tensor(tensor, output_flattened[i][j])
  
      self._collective(
          tensors,
          output_flattened,
          collective_fn,
          postprocess_fn=postprocess_fn,
      )
  
imports: import logging
  import datetime
  import time
  import ray
  import cupy
  from ray.util.collective.const import ENV
  from ray.util.collective.collective_group import nccl_util
  from ray.util.collective.collective_group.base_collective_group import BaseGroup
  from ray.util.collective.const import get_store_name
  from ray.util.collective.types import AllReduceOptions, BarrierOptions, Backend, ReduceOptions, BroadcastOptions, AllGatherOptions, ReduceScatterOptions, SendOptions, RecvOptions
  from ray.util.collective.collective_group.cuda_stream import get_stream_pool
label_desc: Use image node_id 8 for calling the NCCLGroup obj's underlying member method code with example usage: obj.allgather(tensor_lists, tensors, allgather_options) without return types