code: def all_gather(tensor, group=group.WORLD):
      """
      Gathers tensors from the whole group in a list.
  
      Arguments:
          tensor (Tensor): Tensor to be broadcast from current process.
          group (ProcessGroup, optional): The process group to work on.
  
      Returns:
          tuple([Tensor]): Output of the collective.
  
      """
      return _AllGather.apply(group, tensor)
  
imports: import torch
  import torch.distributed
  from torch.autograd import Function
  from torch.distributed import group, ReduceOp
label_desc: Use image node_id 6 for calling a global function with example usage: all_gather(tensor, group) and returns: _AllGather