code: def build_argparse(sub_argparse=None):
      parser = ArgumentParserWithExtraHelp(
          sub_argparse=sub_argparse,
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
      parser.add_argument(
          "--save_output",
          dest="temp_output",
          default=True,
          action="store_false",
          help="Save output - default is to use a temp directory.",
      )
  
      parser.add_argument(
          "treebanks",
          type=str,
          nargs="+",
          help="Which treebanks to run on.  Use all_ud or ud_all for all UD treebanks",
      )
  
      parser.add_argument(
          "--train",
          dest="mode",
          default=Mode.TRAIN,
          action="store_const",
          const=Mode.TRAIN,
          help="Run in train mode",
      )
      parser.add_argument(
          "--score_dev",
          dest="mode",
          action="store_const",
          const=Mode.SCORE_DEV,
          help="Score the dev set",
      )
      parser.add_argument(
          "--score_test",
          dest="mode",
          action="store_const",
          const=Mode.SCORE_TEST,
          help="Score the test set",
      )
  
      # These arguments need to be here so we can identify if the model already exists in the user-specified home
      # TODO: when all of the model scripts handle their own names, can eliminate this argument
      parser.add_argument(
          "--save_dir",
          type=str,
          default=None,
          help="Root dir for saving models.  If set, will override the model's default.",
      )
      parser.add_argument(
          "--save_name",
          type=str,
          default=None,
          help="Base name for saving models.  If set, will override the model's default.",
      )
  
      parser.add_argument(
          "--charlm_only",
          action="store_true",
          default=False,
          help="When asking for ud_all, filter the ones which have charlms",
      )
      parser.add_argument(
          "--transformer_only",
          action="store_true",
          default=False,
          help="When asking for ud_all, filter the ones for languages where we have transformers",
      )
  
      parser.add_argument(
          "--force",
          dest="force",
          action="store_true",
          default=False,
          help="Retrain existing models",
      )
      return parser
  
imports: import argparse
  import glob
  import logging
  import os
  import pathlib
  import sys
  import tempfile
  from enum import Enum
  from stanza.resources.default_packages import default_charlms, lemma_charlms, pos_charlms, depparse_charlms, TRANSFORMERS, TRANSFORMER_LAYERS
  from stanza.models.common.constant import treebank_to_short_name
  from stanza.models.common.utils import ud_scores
  from stanza.resources.common import download, DEFAULT_MODEL_DIR, UnknownLanguageError
  from stanza.utils.datasets import common
  import stanza.utils.default_paths
  from stanza.utils import conll18_ud_eval
label_desc: Use image node_id 1 for calling a global function with example usage: build_argparse(sub_argparse) and returns: parser