code: def all_gather(data):
      """
      Run all_gather on arbitrary picklable data (not necessarily tensors)
      Args:
          data: any picklable object
      Returns:
          list[data]: list of data gathered from each rank
      """
      world_size = get_world_size()
      if world_size == 1:
          return [data]
      data_list = [None] * world_size
      dist.all_gather_object(data_list, data)
      return data_list
  
imports: import datetime
  import errno
  import os
  import time
  from collections import defaultdict, deque
  import torch
  import torch.distributed
label_desc: Use image node_id 1 for calling a global function with example usage: all_gather(data) and returns: data_list, list