code: def tokenize(sentiment_data, pipe):
      """
      Takes a list of (label, text) and returns a list of SentimentDatum with tokenized text
  
      Only the first 'sentence' is used - ideally the pipe has ssplit turned off
      """
      docs = [x.text for x in sentiment_data]
      in_docs = [stanza.Document([], text=d) for d in docs]
      out_docs = pipe(in_docs)
  
      sentiment_data = [
          SentimentDatum(
              datum.sentiment, [y.text for y in doc.sentences[0].tokens]
          )  # list of text tokens for each doc
          for datum, doc in zip(sentiment_data, out_docs)
      ]
  
      return sentiment_data
  
file_path: stanza/stanza/utils/datasets/sentiment/process_es_tass2020.py
imports: import os
  import zipfile
  import stanza
  from stanza.models.classifiers.data import SentimentDatum
  import stanza.utils.default_paths
  from stanza.utils.datasets.sentiment.process_utils import write_dataset, write_list
label_desc: Use image node_id 7 for calling a global function with example usage: tokenize(sentiment_data, pipe) and returns: sentiment_data