code: def parse_args():
      parser = ArgumentParser(
          description="DeepSpeed distributed training launch"
          " utility that creates multiple distributed"
          " processes on a single node"
      )
  
      # Optional arguments for the launch helper
      parser.add_argument(
          "--node_rank",
          type=int,
          default=0,
          help="The rank of the node for multi-node distributed "
          "training",
      )
      parser.add_argument(
          "--master_addr",
          default="127.0.0.1",
          type=str,
          help="Master node (rank 0)'s address, should be either"
          " the IP address or the hostname of node 0, for"
          " single node multi-proc training, the"
          " --master_addr can simply be 127.0.0.1",
      )
      parser.add_argument(
          "--master_port",
          default=TORCH_DISTRIBUTED_DEFAULT_PORT,
          type=int,
          help="Master node (rank 0)'s free port that needs to "
          "be used for communication during distributed "
          "training",
      )
      parser.add_argument(
          "--world_info",
          default="None",
          type=str,
          help="world info base64 encoded dictionary",
      )
  
      parser.add_argument(
          "--module",
          action="store_true",
          help="Change each process to interpret the launch "
          "script as a Python module, executing with the same "
          "behavior as 'python -m'.",
      )
  
      parser.add_argument(
          "--no_python",
          action="store_true",
          help="Skip prepending the training script with "
          "'python' - just execute it directly.",
      )
  
      parser.add_argument(
          "--enable_elastic_training",
          action="store_true",
          help="Enable elastic training support.",
      )
  
      parser.add_argument(
          "--min_elastic_nodes",
          type=int,
          default=-1,
          help="Min number of nodes in elastic training.",
      )
  
      parser.add_argument(
          "--max_elastic_nodes",
          type=int,
          default=-1,
          help="Max number of nodes in elastic training.",
      )
  
      parser.add_argument(
          "--no_local_rank",
          action="store_true",
          help="Do not pass local_rank as an argument when calling "
          "the user's training script.",
      )
  
      parser.add_argument(
          "--save_pid",
          type=int,
          default=0,
          help="main launching process pid, for internal pid tracking",
      )
  
      parser.add_argument(
          "--enable_each_rank_log",
          default="None",
          type=str,
          help="redirect the stdout and stderr from each rank into different log files",
      )
  
      parser.add_argument(
          "--bind_cores_to_rank",
          action="store_true",
          help="Bind each rank to different cores of the host. "
          "This improves host efficiency especially for CPU backend",
      )
  
      parser.add_argument(
          "--bind_core_list",
          type=str,
          default=None,
          help="List of cores to bind to with comma separated list of "
          "numbers and range. i.e. 1,3-5,7 => [1,3,4,5,7].  When not "
          "specified, all cores on system would be used rank binding",
      )
  
      # positional
      parser.add_argument(
          "training_script",
          type=str,
          help="The full path to the single GPU training "
          "program/script to be launched in parallel, "
          "followed by all the arguments for the "
          "training script",
      )
  
      # rest from the training program
      parser.add_argument("training_script_args", nargs=REMAINDER)
      return parser.parse_args()
  
file_path: DeepSpeed/deepspeed/launcher/launch.py
imports: import sys
  import subprocess
  import os
  import json
  import base64
  import time
  import signal
  import psutil
  from collections import defaultdict
  from typing import Dict
  from argparse import ArgumentParser, REMAINDER
  from ..constants import TORCH_DISTRIBUTED_DEFAULT_PORT
  from ..nebula.constants import DLTS_POD_ENV_PATH
  from ..utils import logger, get_numactl_cmd
  from ..elasticity import is_torch_elastic_compatible
  from .constants import ELASTIC_TRAINING_ID_DEFAULT
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: parser