code: def get_tags(datasets):
      """
      return the set of tags used in these datasets
  
      datasets is expected to be train, dev, test but could be any list
      """
      tags = set()
      for dataset in datasets:
          for sentence in dataset:
              for word, tag in sentence:
                  tags.add(tag)
      return tags
  
imports: from collections import defaultdict
  import json
  import os
  import random
  from stanza.models.common.doc import Document
  import stanza.utils.datasets.ner.prepare_ner_file
label_desc: Use image node_id 2 for calling a global function with example usage: get_tags(datasets) and returns: tags