code: def test_write_dataset(tmp_path, train_file, dev_file, test_file):
      """
      Test that writing all three parts of a dataset works
      """
      dataset = [
          data.read_dataset(filename, WVType.OTHER, 1)
          for filename in (train_file, dev_file, test_file)
      ]
      process_utils.write_dataset(dataset, tmp_path, "en_test")
  
      expected_files = [
          "en_test.train.json",
          "en_test.dev.json",
          "en_test.test.json",
      ]
      dataset_files = os.listdir(tmp_path)
      assert sorted(dataset_files) == sorted(expected_files)
  
      for filename, expected in zip(expected_files, dataset):
          written = data.read_dataset(
              tmp_path / filename, WVType.OTHER, 1
          )
          assert written == expected
  
file_path: stanza/stanza/tests/classifiers/test_process_utils.py
imports: import os
  import pytest
  import stanza
  from stanza.models.classifiers import data
  from stanza.models.classifiers.data import SentimentDatum
  from stanza.models.classifiers.utils import WVType
  from stanza.utils.datasets.sentiment import process_utils
  from stanza.tests import TEST_MODELS_DIR
  from stanza.tests.classifiers.test_data import train_file, dev_file, test_file
label_desc: Use image node_id 2 for calling a global function with example usage: test_write_dataset(tmp_path, train_file, dev_file, test_file) without return types