code: def parse_args():
      parser = argparse.ArgumentParser(
          description="Train a model for image classification."
      )
      parser.add_argument(
          "--data-dir",
          type=str,
          default="~/.mxnet/datasets/imagenet",
          help="training and validation pictures to use.",
      )
      parser.add_argument(
          "--rec-train",
          type=str,
          default="~/.mxnet/datasets/imagenet/rec/train.rec",
          help="the training data",
      )
      parser.add_argument(
          "--rec-train-idx",
          type=str,
          default="~/.mxnet/datasets/imagenet/rec/train.idx",
          help="the index of training data",
      )
      parser.add_argument(
          "--rec-val",
          type=str,
          default="~/.mxnet/datasets/imagenet/rec/val.rec",
          help="the validation data",
      )
      parser.add_argument(
          "--rec-val-idx",
          type=str,
          default="~/.mxnet/datasets/imagenet/rec/val.idx",
          help="the index of validation data",
      )
      parser.add_argument(
          "--use-rec",
          action="store_true",
          help="use image record iter for data input. default is false.",
      )
      parser.add_argument(
          "--batch-size",
          type=int,
          default=32,
          help="training batch size per device (CPU/GPU).",
      )
      parser.add_argument(
          "--dtype",
          type=str,
          default="float32",
          help="data type for training. default is float32",
      )
      parser.add_argument(
          "--num-gpus",
          type=int,
          default=0,
          help="number of gpus to use.",
      )
      parser.add_argument(
          "-j",
          "--num-data-workers",
          dest="num_workers",
          default=4,
          type=int,
          help="number of preprocessing workers",
      )
      parser.add_argument(
          "--num-epochs",
          type=int,
          default=3,
          help="number of training epochs.",
      )
      parser.add_argument(
          "--lr",
          type=float,
          default=0.1,
          help="learning rate. default is 0.1.",
      )
      parser.add_argument(
          "--momentum",
          type=float,
          default=0.9,
          help="momentum value for optimizer, default is 0.9.",
      )
      parser.add_argument(
          "--wd",
          type=float,
          default=0.0001,
          help="weight decay rate. default is 0.0001.",
      )
      parser.add_argument(
          "--lr-mode",
          type=str,
          default="step",
          help="learning rate scheduler mode. options are step, poly and cosine.",
      )
      parser.add_argument(
          "--lr-decay",
          type=float,
          default=0.1,
          help="decay rate of learning rate. default is 0.1.",
      )
      parser.add_argument(
          "--lr-decay-period",
          type=int,
          default=0,
          help="interval for periodic learning rate decays. default is 0 to disable.",
      )
      parser.add_argument(
          "--lr-decay-epoch",
          type=str,
          default="40,60",
          help="epochs at which learning rate decays. default is 40,60.",
      )
      parser.add_argument(
          "--mode",
          type=str,
          help="mode in which to train the model. options are symbolic, imperative, hybrid",
      )
      parser.add_argument(
          "--model",
          type=str,
          required=True,
          help="type of model to use. see vision_model for options.",
      )
      parser.add_argument(
          "--input-size",
          type=int,
          default=224,
          help="size of the input image size. default is 224",
      )
      parser.add_argument(
          "--use_se",
          action="store_true",
          help="use SE layers or not in resnext. default is false.",
      )
      parser.add_argument(
          "--label-smoothing",
          action="store_true",
          help="use label smoothing or not in training. default is false.",
      )
      parser.add_argument(
          "--batch-norm",
          action="store_true",
          help="enable batch normalization or not in vgg. default is false.",
      )
      parser.add_argument(
          "--use-pretrained",
          action="store_true",
          help="enable using pretrained model from gluon.",
      )
      parser.add_argument(
          "--log-interval",
          type=int,
          default=50,
          help="Number of batches to wait before logging.",
      )
      parser.add_argument(
          "--save-frequency",
          type=int,
          default=10,
          help="frequency of model saving.",
      )
      parser.add_argument(
          "--save-dir",
          type=str,
          default="params",
          help="directory of saved models",
      )
      parser.add_argument(
          "--logging-file",
          type=str,
          default="train_imagenet.log",
          help="name of training log file",
      )
      opt = parser.parse_args()
      return opt
  
file_path: gluon-cv/scripts/classification/imagenet/train_imagenet_nasnet.py
imports: import argparse, time, logging, os
  import mxnet
  from mxnet import gluon, nd
  from mxnet import autograd
  from mxnet.gluon import nn
  from mxnet.gluon.data.vision import transforms
  import gluoncv
  from gluoncv.data import imagenet
  from gluoncv.loss import MixSoftmaxCrossEntropyLoss
  from gluoncv.model_zoo import get_model
  from gluoncv.utils import makedirs, LRScheduler, LRSequential
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: opt