code: def _gpu_gather_object(object: Any):
      output_objects = [
          None for _ in range(PartialState().num_processes)
      ]
      torch.distributed.all_gather_object(output_objects, object)
      # all_gather_object returns a list of lists, so we need to flatten it
      return [x for y in output_objects for x in y]
  
imports: import pickle
  import warnings
  from functools import update_wrapper, wraps
  from typing import Any, Mapping
  import torch
  from ..state import PartialState
  from .constants import TORCH_DISTRIBUTED_OPERATION_TYPES
  from .dataclasses import DistributedType, TensorInformation
  from .imports import is_npu_available, is_torch_distributed_available, is_torch_version, is_tpu_available
label_desc: Use image node_id 18 for calling a global function with example usage: _gpu_gather_object(object) and returns: unknown