code: def parse_args():
      parser = argparse.ArgumentParser(
          description="Script that retags a tree file"
      )
      parser.add_argument(
          "--lang", default="vi", type=str, help="Language"
      )
      parser.add_argument(
          "--input_file",
          default="data/constituency/vi_vlsp21_train.mrg",
          help="File to retag",
      )
      parser.add_argument(
          "--output_file",
          default="vi_vlsp21_train_retagged.mrg",
          help="Where to write the retagged trees",
      )
      parser.add_argument(
          "--retag_package",
          default="default",
          help="Which tagger shortname to use when retagging trees.  None for no retagging.  Retagging is recommended, as gold tags will not be available at pipeline time",
      )
      parser.add_argument(
          "--retag_method",
          default="upos",
          choices=["xpos", "upos"],
          help="Which tags to use when retagging",
      )
  
      parser.add_argument(
          "--bracket_labels",
          action="store_true",
          help="Write the trees as bracket labels instead of S-expressions",
      )
  
      args = parser.parse_args()
      args = vars(args)
  
      if args["retag_method"] == "xpos":
          args["retag_xpos"] = True
      elif args["retag_method"] == "upos":
          args["retag_xpos"] = False
      else:
          raise ValueError("Unknown retag method {}".format(xpos))
  
      return args
  
imports: import argparse
  import logging
  from stanza import Pipeline
  from stanza.models.constituency import tree_reader
  from stanza.models.constituency.utils import retag_trees
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args