code: def main():
      import argparse
  
      parser = argparse.ArgumentParser(description="Annotate data")
      parser.add_argument(
          "-i",
          "--input",
          type=argparse.FileType("r"),
          default=sys.stdin,
          help="Input file to process; each line contains one document (default: stdin)",
      )
      parser.add_argument(
          "-o",
          "--output",
          type=argparse.FileType("w"),
          default=sys.stdout,
          help="File to write annotations to (default: stdout)",
      )
      parser.add_argument(
          "-f",
          "--format",
          choices=[
              "json",
          ],
          default="json",
          help="Output format",
      )
      parser.add_argument(
          "-a",
          "--annotators",
          nargs="+",
          type=str,
          default=["tokenize ssplit lemma pos"],
          help="A list of annotators",
      )
      parser.add_argument(
          "-s",
          "--sentence-mode",
          action="store_true",
          help="Assume each line of input is a sentence.",
      )
      parser.add_argument(
          "-v",
          "--verbose-server",
          action="store_true",
          help="Server is made verbose",
      )
      parser.add_argument(
          "-m",
          "--memory",
          type=str,
          default="4G",
          help="Memory to use for the server",
      )
      parser.add_argument(
          "-p",
          "--props",
          nargs="+",
          type=dictstr,
          help="Properties as a list of key=value pairs",
      )
      parser.set_defaults(func=do_annotate)
  
      ARGS = parser.parse_args()
      if ARGS.func is None:
          parser.print_help()
          sys.exit(1)
      else:
          ARGS.func(ARGS)
  
file_path: stanza/stanza/server/main.py
imports: import corenlp
  import json
  import re
  import csv
  import sys
  from collections import namedtuple, OrderedDict
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types