code: def all_gather_unaligned(data, group=None):
      """
      Run all_gather on arbitrary picklable data (not necessarily tensors).
  
      Args:
          data: any picklable object
          group: a torch process group. By default, will use a group which
              contains all ranks on gloo backend.
  
      Returns:
          list[data]: list of data gathered from each rank
      """
      if get_world_size() == 1:
          return [data]
      if group is None:
          group = _get_global_gloo_group()
      if dist.get_world_size(group) == 1:
          return [data]
  
      tensor = _serialize_to_tensor(data, group)
  
      size_list, tensor = _pad_to_largest_tensor(tensor, group)
      max_size = max(size_list)
  
      # receiving Tensor from all ranks
      tensor_list = [
          torch.empty(
              (max_size,), dtype=torch.uint8, device=tensor.device
          )
          for _ in size_list
      ]
      dist.all_gather(tensor_list, tensor, group=group)
  
      data_list = []
      for size, tensor in zip(size_list, tensor_list):
          buffer = tensor.cpu().numpy().tobytes()[:size]
          data_list.append(pickle.loads(buffer))
  
      return data_list
  
imports: import functools
  import logging
  import pickle
  import torch
  import torch.distributed
  from pytorchvideo.layers.distributed import cat_all_gather, get_local_process_group, get_local_rank, get_local_size, get_world_size, init_distributed_training
label_desc: Use image node_id 12 for calling a global function with example usage: all_gather_unaligned(data, group) and returns: data_list, list, list