code: def all_gather_list(data: Union[List, Tensor, Dict[str, Tensor]]):
      world_size = dist.get_world_size()
      data_list = [None] * world_size
      # dist_barrier()
      dist.all_gather_object(data_list, data)
      return data_list
  
file_path: ml-cvnets/utils/tensor_utils.py
imports: from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from torch import Tensor
  from torch import distributed
  from common import DEFAULT_IMAGE_CHANNELS, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, DEFAULT_VIDEO_FRAMES
  from utils.third_party.ddp_functional_utils import all_gather
label_desc: Use image node_id 6 for calling a global function with example usage: all_gather_list(data) and returns: data_list