code: def get_full_parser() -> argparse.ArgumentParser:
      parser = argparse.ArgumentParser(
          prog="Determined AI DeepSpeed Autotune",
      )
      subparsers = parser.add_subparsers(
          required=True, dest="search_method"
      )
      base_parser = get_base_parser()
  
      subparsers.add_parser(
          "_test",
          parents=[base_parser],
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
  
      random_subparser = subparsers.add_parser(
          "random",
          parents=[base_parser],
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
      random_subparser.add_argument(
          "--trials-per-random-config",
          type=int,
          default=_defaults.AUTOTUNING_ARG_DEFAULTS[
              "trials-per-random-config"
          ],
          help="Maximum number of trials to run per random config",
      )
      random_subparser.add_argument(
          "--early-stopping",
          type=int,
          help="Terminates the search if a new best config not found in last `early-stopping` trials",
      )
  
      binary_subparser = subparsers.add_parser(
          "binary",
          parents=[base_parser],
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
      search_range_factor_help = "Expands the initial search range by a factor of `search-range-factor`"
      binary_subparser.add_argument(
          "--search-range-factor",
          type=float,
          default=_defaults.AUTOTUNING_ARG_DEFAULTS[
              "search-range-factor"
          ],
          help=search_range_factor_help,
      )
  
      asha_subparser = subparsers.add_parser(
          "asha",
          parents=[base_parser],
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
      asha_subparser.add_argument(
          "--max-rungs",
          default=_defaults.AUTOTUNING_ARG_DEFAULTS["max-rungs"],
          help="Maximum rungs to use in the ASHA algorithm",
      )
      asha_subparser.add_argument(
          "--min-binary-search-trials",
          default=_defaults.AUTOTUNING_ARG_DEFAULTS[
              "min-binary-search-trials"
          ],
          help="Minimum number of binary search trials to run per random configuration",
      )
      asha_subparser.add_argument(
          "--asha-early-stopping",
          default=_defaults.AUTOTUNING_ARG_DEFAULTS[
              "asha-early-stopping"
          ],
          help="ASHA early stopping parameter (`s` in arxiv:1810.05934)",
      )
      asha_subparser.add_argument(
          "--divisor",
          default=_defaults.AUTOTUNING_ARG_DEFAULTS["divisor"],
          help="ASHA divisor parameter (`eta` in arxiv:1810.05934)",
      )
      asha_subparser.add_argument(
          "--search-range-factor",
          type=float,
          default=_defaults.AUTOTUNING_ARG_DEFAULTS[
              "search-range-factor"
          ],
          help=search_range_factor_help,
      )
  
      return parser
  
imports: import argparse
  import copy
  import json
  import logging
  import pathlib
  import random
  from contextlib import contextmanager
  from typing import Any, Dict, Generator, List, Optional, Union
  import filelock
  import torch
  import determined
  from determined.common import util
  from determined.pytorch.dsat import _defaults
  from determined.util import merge_dicts
label_desc: Use image node_id 2 for calling a global function with example usage: get_full_parser() and returns: parser