code: def parse_args():
      parser = argparse.ArgumentParser(
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
          description=__doc__,
      )
  
      # Model
      group = parser.add_argument_group("Model")
      group.add_argument(
          "--model-name",
          type=str,
          default="google_en_cased_bert_base",
          choices=nlp.models.bert.list_pretrained_bert(),
          help="Name of the model configuration.",
      )
  
      # Input
      group = parser.add_mutually_exclusive_group(required=True)
      group.add_argument(
          "--inputs", type=pathlib.Path, nargs="+", help="Input files."
      )
      group.add_argument(
          "--input-reference",
          type=pathlib.Path,
          help="Path to file containing input file paths on each line.",
      )
      group = parser.add_argument_group("Output")
      parser.add_argument("--output", required=True, type=pathlib.Path)
  
      # data pre-processing
      group = parser.add_argument_group("Data pre-processing")
      group.add_argument(
          "--dupe-factor",
          type=int,
          default=5,
          help="Number of times to duplicate the input data (with different masks).",
      )
      group.add_argument(
          "--max-seq-length",
          type=int,
          default=512,
          help="Maximum input sequence length.",
      )
      group.add_argument(
          "--short-seq-prob",
          type=float,
          default=0.1,
          help="The probability of producing sequences shorter than max_seq_length.",
      )
      group.add_argument(
          "--masked-lm-prob",
          type=float,
          default=0.15,
          help="Probability for masks.",
      )
      group.add_argument(
          "--max-predictions-per-seq",
          type=int,
          default=80,
          help="Maximum number of predictions per sequence.",
      )
      # group.add_argument('--whole_word_mask', action=nlp.utils.misc.BooleanOptionalAction,
      #                    default=False,
      #                    help='Whether to use whole word masking rather than per-subword masking.')
  
      # Computation and communication
      group = parser.add_argument_group("Computation")
      group.add_argument(
          "--processes",
          type=int,
          default=os.cpu_count(),
          help="Number of processes in process pool.",
      )
      group.add_argument(
          "--seed", type=int, default=100, help="Random seed"
      )
  
      # Misc
      group = parser.add_argument_group("Misc")
      group.add_argument("--logging-steps", type=int, default=10)
  
      args = parser.parse_args()
  
      return args
  
file_path: gluon-nlp/docs/model_zoo/pretraining/torch/bert/prepare_quickthought.py
imports: import tqdm
  import argparse
  import time
  import os
  import pathlib
  import random
  import math
  import multiprocessing
  from smart_open import open
  import gluonnlp
  import numpy
  import pyarrow
  import pyarrow.feather
  import pyarrow.compute
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args