code: def main():
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "--ner_model",
          type=str,
          default=None,
          help="Which spacy model to test",
      )
      parser.add_argument(
          "filename", type=str, nargs="*", help="which files to test"
      )
      parser.add_argument(
          "--simplify",
          default=False,
          action="store_true",
          help="Simplify classes to the 8 class Worldwide model",
      )
      args = parser.parse_args()
  
      if args.ner_model is None:
          ner_models = ["en_core_web_sm", "en_core_web_trf"]
      else:
          ner_models = [args.ner_model]
  
      if not args.filename:
          args.filename = [
              "data/ner/en_ontonotes-8class.test.json",
              "data/ner/en_worldwide-8class.test.json",
              "data/ner/en_worldwide-8class-africa.test.json",
              "data/ner/en_worldwide-8class-asia.test.json",
              "data/ner/en_worldwide-8class-indigenous.test.json",
              "data/ner/en_worldwide-8class-latam.test.json",
              "data/ner/en_worldwide-8class-middle_east.test.json",
          ]
  
      print("Processing the files: %s" % ",".join(args.filename))
  
      results = []
      model_results = {}
  
      for ner_model in ner_models:
          model_results[ner_model] = []
          # load tagger
          print("-----------------------------")
          print("Running %s" % ner_model)
          print("-----------------------------")
          tagger = spacy.load(
              ner_model,
              disable=[
                  "tagger",
                  "parser",
                  "attribute_ruler",
                  "lemmatizer",
              ],
          )
  
          for filename in args.filename:
              f_micro = test_file(filename, tagger, args.simplify)
              f_micro = "%.2f" % (f_micro * 100)
              results.append((ner_model, filename, f_micro))
              model_results[ner_model].append(f_micro)
  
      for result in results:
          print(result)
  
      for model in model_results.keys():
          result = [model] + model_results[model]
          print(" & ".join(result))
  
file_path: stanza/stanza/utils/ner/spacy_ner_tag_dataset.py
imports: import argparse
  import json
  import spacy
  from spacy.tokens import Doc
  from stanza.models.ner.utils import process_tags
  from stanza.models.ner.scorer import score_by_entity, score_by_token
  from stanza.utils.confusion import format_confusion
  from stanza.utils.datasets.ner.simplify_ontonotes_to_worldwide import simplify_ontonotes_to_worldwide
  from stanza.utils.get_tqdm import get_tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types