code: def parse_args():
      parser = argparse.ArgumentParser(
          description="GPT-2 unconditional sampler. Load a GPT-2 model and sample."
      )
      parser.add_argument(
          "--model_name",
          type=str,
          default="gpt2_124M",
          choices=list_pretrained_gpt2(),
          help="Model name",
      )
      parser.add_argument(
          "--seed", type=int, default=None, help="The random seed"
      )
      parser.add_argument(
          "--nsamples",
          type=int,
          default=0,
          help="Number of samples to return",
      )
      parser.add_argument(
          "--batch_size", type=int, default=1, help="Number of batches"
      )
      parser.add_argument(
          "--length",
          type=int,
          default=None,
          help="Number of tokens in generated text, if None (default), is "
          "determined by model max_length",
      )
      parser.add_argument(
          "--temperature", type=float, default=1.0, help=""
      )
      parser.add_argument(
          "--top_k",
          type=int,
          default=-1,
          help="Multinomial sampling with topk, "
          'see [ACL2018] "Hierarchical Neural Story Generation"'
          "https://www.aclweb.org/anthology/P18-1082.pdf",
      )
      parser.add_argument(
          "--top_p",
          type=float,
          default=-1.0,
          help="Multinomial sampling with topp, "
          'see [ICLR2020] "The Curious Case of Neural Text Degeneration"'
          "https://arxiv.org/abs/1904.09751",
      )
      parser.add_argument(
          "--gpu",
          type=int,
          default=0,
          help="Which gpu to use, set None to use cpu",
      )
      parser.add_argument(
          "--layout",
          type=str,
          choices=["NT", "TN"],
          default="NT",
          help="Layout of the inference model",
      )
      return parser.parse_args()
  
file_path: gluon-nlp/scripts/generation/interactive_conditional_gpt2_samples.py
imports: import os
  import mxnet
  import argparse
  from gluonnlp.utils import set_seed
  from gluonnlp.sequence_sampler import BeamSearchSampler, BaseStepDecoder
  from gluonnlp.models.gpt2 import GPT2ForLM, list_pretrained_gpt2, get_pretrained_gpt2
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: parser