code: def add_parser_arguments(parser, skip_arch=False):
      parser.add_argument("data", metavar="DIR", help="path to dataset")
      parser.add_argument(
          "--data-backend",
          metavar="BACKEND",
          default="dali",
          choices=DATA_BACKEND_CHOICES,
          help="data backend: "
          + " | ".join(DATA_BACKEND_CHOICES)
          + " (default: dali)",
      )
      parser.add_argument(
          "--interpolation",
          metavar="INTERPOLATION",
          default="bicubic",
          help="interpolation type for resizing images: bilinear, bicubic or triangular (DALI only)",
      )
      if not skip_arch:
          model_names = available_models().keys()
          parser.add_argument(
              "--arch",
              "-a",
              metavar="ARCH",
              default="efficientnet-b0",
              choices=model_names,
              help="model architecture: "
              + " | ".join(model_names)
              + " (default: efficientnet-b0)",
          )
  
      parser.add_argument(
          "-j",
          "--workers",
          default=4,
          type=int,
          metavar="N",
          help=(
              "number of data loading workers (default: 4)."
              " The number of workers for PyTorch loader is doubled."
          ),
      )
      parser.add_argument(
          "--prefetch",
          default=4,
          type=int,
          metavar="N",
          help="number of samples prefetched by each loader (PyTorch only)",
      )
      parser.add_argument(
          "--dali-device",
          default="gpu",
          type=str,
          choices=["cpu", "gpu"],
          help=(
              "The placement of DALI decode and random resized crop operations (default: gpu)"
          ),
      )
      parser.add_argument(
          "--epochs",
          default=400,
          type=int,
          metavar="N",
          help="number of total epochs to run",
      )
      parser.add_argument(
          "--run-epochs",
          default=-1,
          type=int,
          metavar="N",
          help="run only N epochs, used for checkpointing runs",
      )
      parser.add_argument(
          "--early-stopping-patience",
          default=-1,
          type=int,
          metavar="N",
          help="early stopping after N epochs without validation accuracy improving",
      )
      parser.add_argument(
          "--image-size",
          default=224,
          type=int,
          help="resolution of image",
      )
      parser.add_argument(
          "-b",
          "--batch-size",
          default=64,
          type=int,
          metavar="N",
          help="mini-batch size (default: 64) per gpu",
      )
  
      parser.add_argument(
          "--optimizer-batch-size",
          default=4096,
          type=int,
          metavar="N",
          help="size of a total batch size, for simulating bigger batches using gradient accumulation",
      )
  
      parser.add_argument(
          "--lr",
          "--learning-rate",
          default=0.08,
          type=float,
          metavar="LR",
          help="initial learning rate",
      )
      parser.add_argument(
          "--lr-schedule",
          default="cosine",
          type=str,
          metavar="SCHEDULE",
          choices=["step", "linear", "cosine"],
          help="Type of LR schedule: {}, {}, {}".format(
              "step", "linear", "cosine"
          ),
      )
  
      parser.add_argument("--end-lr", default=0, type=float)
  
      parser.add_argument(
          "--warmup",
          default=16,
          type=int,
          metavar="E",
          help="number of warmup epochs",
      )
  
      parser.add_argument(
          "--label-smoothing",
          default=0.1,
          type=float,
          metavar="S",
          help="label smoothing",
      )
      parser.add_argument(
          "--mixup",
          default=0.2,
          type=float,
          metavar="ALPHA",
          help="mixup alpha",
      )
      parser.add_argument(
          "--optimizer",
          default="rmsprop",
          type=str,
          choices=("sgd", "rmsprop"),
      )
  
      parser.add_argument(
          "--momentum",
          default=0.9,
          type=float,
          metavar="M",
          help="momentum",
      )
      parser.add_argument(
          "--weight-decay",
          "--wd",
          default=1e-05,
          type=float,
          metavar="W",
          help="weight decay (default: 1e-5)",
      )
      parser.add_argument(
          "--bn-weight-decay",
          action="store_true",
          help="use weight_decay on batch normalization learnable parameters, (default: false)",
      )
      parser.add_argument(
          "--rmsprop-alpha",
          default=0.9,
          type=float,
          help="value of alpha parameter in rmsprop optimizer (default: 0.9)",
      )
      parser.add_argument(
          "--rmsprop-eps",
          default=0.01,
          type=float,
          help="value of eps parameter in rmsprop optimizer (default: 0.01)",
      )
  
      parser.add_argument(
          "--nesterov",
          action="store_true",
          help="use nesterov momentum, (default: false)",
      )
  
      parser.add_argument(
          "--print-freq",
          "-p",
          default=100,
          type=int,
          metavar="N",
          help="print frequency (default: 100)",
      )
      parser.add_argument(
          "--resume",
          default=None,
          type=str,
          metavar="PATH",
          help="path to latest checkpoint (default: none)",
      )
      parser.add_argument(
          "--static-loss-scale",
          type=float,
          default=1,
          help="Static loss scale, positive power of 2 values can improve amp convergence.",
      )
      parser.add_argument(
          "--prof",
          type=int,
          default=-1,
          metavar="N",
          help="Run only N iterations",
      )
      parser.add_argument(
          "--amp",
          action="store_true",
          help="Run model AMP (automatic mixed precision) mode.",
      )
  
      parser.add_argument(
          "--seed",
          default=None,
          type=int,
          help="random seed used for numpy and pytorch",
      )
  
      parser.add_argument(
          "--gather-checkpoints",
          default="0",
          type=int,
          help=(
              "Gather N last checkpoints throughout the training,"
              " without this flag only best and last checkpoints will be stored. "
              "Use -1 for all checkpoints"
          ),
      )
  
      parser.add_argument(
          "--report-file",
          default="experiment_report.json",
          type=str,
          help="file in which to store JSON experiment report",
      )
  
      parser.add_argument(
          "--evaluate",
          action="store_true",
          help="evaluate checkpoint/model",
      )
      parser.add_argument(
          "--training-only", action="store_true", help="do not evaluate"
      )
  
      parser.add_argument(
          "--no-checkpoints",
          action="store_false",
          dest="save_checkpoints",
          help="do not store any checkpoints, useful for benchmarking",
      )
      parser.add_argument(
          "--jit",
          type=str,
          default="no",
          choices=["no", "script"],
          help="no -> do not use torch.jit; script -> use torch.jit.script",
      )
  
      parser.add_argument(
          "--checkpoint-filename",
          default="checkpoint.pth.tar",
          type=str,
      )
  
      parser.add_argument(
          "--workspace",
          type=str,
          default="./",
          metavar="DIR",
          help="path to directory where checkpoints will be stored",
      )
      parser.add_argument(
          "--memory-format",
          type=str,
          default="nhwc",
          choices=["nchw", "nhwc"],
          help="memory layout, nchw or nhwc",
      )
      parser.add_argument(
          "--use-ema", default=None, type=float, help="use EMA"
      )
      parser.add_argument(
          "--automatic-augmentation",
          type=str,
          default="autoaugment",
          choices=["disabled", "autoaugment", "trivialaugment"],
          help="Automatic augmentation method, trivialaugment is supported only for DALI data backend",
      )
  
      parser.add_argument(
          "--gpu-affinity",
          type=str,
          default="socket_unique_contiguous",
          required=False,
          choices=[am.name for am in AffinityMode],
      )
  
      parser.add_argument(
          "--topk",
          type=int,
          default=5,
          required=False,
      )
  
imports: import os
  import argparse
  import random
  from copy import deepcopy
  import torch.backends.cudnn
  import torch.distributed
  import torch.nn.parallel
  import torch.optim
  import torch.utils.data
  import torch.utils.data.distributed
  import image_classification.logger
  from image_classification.smoothing import LabelSmoothing
  from image_classification.mixup import NLLMultiLabelSmooth, MixUpWrapper
  from image_classification.dataloaders import *
  from image_classification.training import *
  from image_classification.utils import *
  from image_classification.models import efficientnet_b0
  from image_classification.optimizers import get_optimizer, lr_cosine_policy, lr_linear_policy, lr_step_policy
  from image_classification.gpu_affinity import set_affinity, AffinityMode
  import dllogger
label_desc: Use image node_id 2 for calling a global function with example usage: add_parser_arguments(parser, skip_arch) without return types