code: def remap_labels(docs, remap):
      if not remap:
          return docs
  
      remappings = {}
      for remapping in remap.split(","):
          pieces = remapping.split("=")
          remappings[pieces[0]] = pieces[1]
  
      print(remappings)
  
      new_docs = []
      for doc in docs:
          entities = copy.deepcopy(doc[1])
          for entity in entities:
              entity["label"] = remappings.get(
                  entity["label"], entity["label"]
              )
          new_doc = (doc[0], entities)
          new_docs.append(new_doc)
      return new_docs
  
file_path: stanza/stanza/utils/datasets/ner/convert_amt.py
imports: import argparse
  import copy
  import json
  from operator import itemgetter
  import sys
  from tqdm import tqdm
  import stanza
  from stanza.utils.datasets.ner.utils import write_sentences
  import stanza.utils.datasets.ner.prepare_ner_file
label_desc: Use image node_id 3 for calling a global function with example usage: remap_labels(docs, remap) and returns: new_docs, docs