code: def parse_args(args=None):
      parser = argparse.ArgumentParser()
  
      parser.add_argument(
          "--eval_file",
          type=str,
          default=None,
          help="Input file for data loader.",
      )
      parser.add_argument(
          "--tokenized_file",
          type=str,
          default=None,
          help="Input file of tokenized text for parsing with parse_text.",
      )
      parser.add_argument(
          "--tokenized_dir",
          type=str,
          default=None,
          help="Input directory of tokenized text for parsing with parse_text.",
      )
  
      parser.add_argument(
          "--charlm_forward_file",
          type=str,
          default=None,
          help="Exact path to use for forward charlm",
      )
      parser.add_argument(
          "--charlm_backward_file",
          type=str,
          default=None,
          help="Exact path to use for backward charlm",
      )
      parser.add_argument(
          "--wordvec_pretrain_file",
          type=str,
          default=None,
          help="Exact name of the pretrain file to read",
      )
  
      utils.add_device_args(parser)
  
      parser.add_argument(
          "--lang", default="en", help="Language to use"
      )
  
      parser.add_argument(
          "--eval_batch_size",
          type=int,
          default=50,
          help="How many trees to batch when running eval",
      )
      parser.add_argument(
          "models",
          type=str,
          nargs="+",
          default=None,
          help="Which model(s) to load",
      )
  
      parser.add_argument(
          "--mode", default="predict", choices=["parse_text", "predict"]
      )
      add_predict_output_args(parser)
  
      retagging.add_retag_args(parser)
  
      args = vars(parser.parse_args())
  
      retagging.postprocess_args(args)
      postprocess_predict_output_args(args)
      args["num_generate"] = 0
  
      if not args["eval_file"] and args["lang"] in DEFAULT_EVAL:
          paths = get_default_paths()
          args["eval_file"] = os.path.join(
              paths["CONSTITUENCY_DATA_DIR"], DEFAULT_EVAL[args["lang"]]
          )
  
      return args
  
imports: import argparse
  import logging
  import os
  import torch
  from stanza.models.common import utils
  from stanza.models.common.foundation_cache import FoundationCache
  from stanza.models.constituency import parse_transitions
  from stanza.models.constituency import retagging
  from stanza.models.constituency import tree_reader
  from stanza.models.constituency.trainer import Trainer, run_dev_set, parse_text, parse_dir
  from stanza.models.constituency.utils import add_predict_output_args, postprocess_predict_output_args, retag_trees
  from stanza.resources.common import DEFAULT_MODEL_DIR
  from stanza.server.parser_eval import EvaluateParser, ParseResult, ScoredTree
  from stanza.utils.default_paths import get_default_paths
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args(args) and returns: args