code: def read_snippets(
      csv_filename,
      sentiment_column,
      text_column,
      tokenizer_language,
      mapping,
      delimiter="\t",
      quotechar=None,
      skip_first_line=False,
      nlp=None,
      encoding="utf-8",
  ):
      """
      Read in a single CSV file and return a list of SentimentDatums
      """
      if nlp is None:
          nlp = stanza.Pipeline(
              tokenizer_language, processors="tokenize"
          )
  
      with open(csv_filename, newline="", encoding=encoding) as fin:
          if skip_first_line:
              next(fin)
          cin = csv.reader(
              fin, delimiter=delimiter, quotechar=quotechar
          )
          lines = list(cin)
  
      # Read in the data and parse it
      snippets = []
      for idx, line in enumerate(tqdm(lines)):
          try:
              if isinstance(sentiment_column, int):
                  sentiment = line[sentiment_column].lower()
              else:
                  sentiment = tuple([line[x] for x in sentiment_column])
          except IndexError as e:
              raise IndexError(
                  "Columns {} did not exist at line {}: {}".format(
                      sentiment_column, idx, line
                  )
              ) from e
          text = line[text_column]
          doc = nlp(text.strip())
  
          converted_sentiment = mapping.get(sentiment, None)
          if converted_sentiment is None:
              raise ValueError(
                  "Value {} not in mapping at line {} of {}".format(
                      sentiment, idx, csv_filename
                  )
              )
  
          text = []
          for sentence in doc.sentences:
              text.extend(token.text for token in sentence.tokens)
          text = clean_tokenized_tweet(text)
          snippets.append(SentimentDatum(converted_sentiment, text))
      return snippets
  
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 6 for calling a global function with example usage: read_snippets(csv_filename, sentiment_column, text_column, tokenizer_language, mapping, delimiter, quotechar, skip_first_line, nlp, encoding) and returns: snippets