code: def combine_dataset(
      input_dir, output_dir, input_datasets, output_dataset
  ):
      datasets = []
      for shard in SHARDS:
          full_dataset = []
          for input_dataset in input_datasets:
              input_filename = "%s.%s.json" % (input_dataset, shard)
              input_path = os.path.join(input_dir, input_filename)
              with open(input_path, encoding="utf-8") as fin:
                  dataset = json.load(fin)
                  converted = [
                      [(word["text"], word["ner"]) for word in sentence]
                      for sentence in dataset
                  ]
                  full_dataset.extend(converted)
          datasets.append(full_dataset)
      write_dataset(datasets, output_dir, output_dataset)
  
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 11 for calling a global function with example usage: combine_dataset(input_dir, output_dir, input_datasets, output_dataset) without return types