code: def write_dataset(dataset, out_directory, dataset_name):
      """
      Write train, dev, test as .json files for a given dataset
  
      dataset: 3 lists of sentiment tuples
      """
      for shard, phrases in zip(SHARDS, dataset):
          output_file = os.path.join(
              out_directory, "%s.%s.json" % (dataset_name, shard)
          )
          write_list(output_file, phrases)
  
file_path: stanza/stanza/utils/datasets/sentiment/process_utils.py
imports: import csv
  import glob
  import json
  import os
  import tempfile
  from collections import namedtuple
  from tqdm import tqdm
  import stanza
  from stanza.models.classifiers.data import SentimentDatum
label_desc: Use image node_id 2 for calling a global function with example usage: write_dataset(dataset, out_directory, dataset_name) without return types