code: def test_read_snippets(tmp_path):
      """
      Test the basic operation of the read_snippets function
      """
      filename = tmp_path / "foo.csv"
      with open(filename, "w", encoding="utf-8") as fout:
          fout.write("FOO\tThis is a test\thappy\n")
          fout.write("FOO\tThis is a second sentence\tsad\n")
  
      nlp = stanza.Pipeline(
          "en",
          dir=TEST_MODELS_DIR,
          processors="tokenize",
          download_method=None,
      )
  
      mapping = {"happy": 0, "sad": 1}
  
      snippets = process_utils.read_snippets(
          filename, 2, 1, "en", mapping, nlp=nlp
      )
      assert len(snippets) == 2
      assert snippets == [
          SentimentDatum(sentiment=0, text=["This", "is", "a", "test"]),
          SentimentDatum(
              sentiment=1,
              text=["This", "is", "a", "second", "sentence"],
          ),
      ]
  
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 3 for calling a global function with example usage: test_read_snippets(tmp_path) without return types