code: def get_parser_with_args():
      parser = options.get_parser(
          "Generation", default_task="pytorch_translate"
      )
      pytorch_translate_options.add_verbosity_args(parser)
      pytorch_translate_options.add_dataset_args(parser, gen=True)
      generation_group = options.add_generation_args(parser)
      pytorch_translate_options.expand_generation_args(generation_group)
  
      generation_group.add_argument(
          "--source-vocab-file",
          default="",
          metavar="FILE",
          help="Path to text file representing the Dictionary to use.",
      )
      generation_group.add_argument(
          "--char-source-vocab-file",
          default="",
          metavar="FILE",
          help=(
              "Same as --source-vocab-file except using characters. "
              "(For use with char_source and char_aware models only.)"
          ),
      )
      generation_group.add_argument(
          "--target-vocab-file",
          default="",
          metavar="FILE",
          help="Path to text file representing the Dictionary to use.",
      )
      generation_group.add_argument(
          "--char-target-vocab-file",
          default="",
          metavar="FILE",
          help=(
              "Same as --source-target-file except using characters. "
              "(For use with char_aware models only.)"
          ),
      )
      generation_group.add_argument(
          "--multiling-source-lang",
          action="append",
          metavar="SRC",
          help=(
              "Must be set for decoding with multilingual models. "
              "Must match an entry from --multiling-encoder-lang from training."
          ),
      )
      generation_group.add_argument(
          "--multiling-target-lang",
          action="append",
          metavar="TARGET",
          help=(
              "Must be set for decoding with multilingual models. "
              "Must match an entry from --multiling-decoder-lang from training."
          ),
      )
  
      # Add args related to benchmarking.
      group = parser.add_argument_group("Benchmarking")
      group.add_argument(
          "--runs-per-length",
          default=10,
          type=int,
          help="Number of times to run generation on each length.",
      )
      group.add_argument(
          "--examples-per-length",
          default=1,
          type=int,
          help="Sentences of each length to include in each eval (batched if >1).",
      )
  
      return parser
  
file_path: translate/pytorch_translate/benchmark.py
imports: import os
  import random
  import tempfile
  from fairseq import options, tasks
  from pytorch_translate import generate, options, rnn, utils
  from pytorch_translate.constants import CHECKPOINT_PATHS_DELIMITER
label_desc: Use image node_id 1 for calling a global function with example usage: get_parser_with_args() and returns: parser