code: def get_dist_params() -> Tuple[int, int, str]:
      master_addr = "127.0.0.1"
      master_port = "29500"
      os.environ["MASTER_ADDR"] = master_addr
      os.environ["MASTER_PORT"] = master_port
  
      mpi_rank = int(os.environ.get("PMI_RANK", -1))
      mpi_world_size = int(os.environ.get("PMI_SIZE", -1))
      rank = (
          mpi_rank if mpi_world_size > 0 else os.environ.get("RANK", 0)
      )
      world_size = (
          mpi_world_size
          if mpi_world_size > 0
          else os.environ.get("WORLD_SIZE", 1)
      )
  
      os.environ["RANK"] = str(rank)
      os.environ["WORLD_SIZE"] = str(world_size)
  
      init_method = f"tcp://{master_addr}:{master_port}"
  
      return rank, world_size, init_method
  
imports: import copy
  import os
  import os.path
  from typing import Any, Tuple, Union
  import intel_extension_for_pytorch
  import oneccl_bindings_for_pytorch
  import torch
  import torch.distributed
  import torch.nn.functional
  from ogb.nodeproppred import Evaluator, PygNodePropPredDataset
  from torch import Tensor
  from torch.nn import Linear
  from torch.nn.parallel import DistributedDataParallel
  from tqdm import tqdm
  from torch_geometric.loader import NeighborLoader
  from torch_geometric.nn import GATConv
  from torch_geometric.profile import get_stats_summary, profileit
label_desc: Use image node_id 3 for calling a global function with example usage: get_dist_params() and returns: rank,  world_size,  init_method