code: def global_all_gather(obj, timeout: Optional[int] = None) -> Any:
      r"""Gathers objects from all groups in a list."""
      if timeout is None:
          return rpc.api._all_gather(obj)
      return rpc.api._all_gather(obj, timeout=timeout)
  
imports: import logging
  import threading
  from abc import ABC, abstractmethod
  from typing import Any, Callable, Dict, List, Optional
  from torch.distributed import rpc
  from torch_geometric.distributed.dist_context import DistContext, DistRole
label_desc: Use image node_id 3 for calling a global function with example usage: global_all_gather(obj, timeout) and returns: rpc, rpc