code: def read_snippets(xml_directory):
      sentences = []
      for filename in glob.glob(xml_directory + "/xml/cet_*xml"):
          sentences.extend(get_phrases(filename))
  
      nlp = stanza.Pipeline("zh", processors="tokenize")
      snippets = []
      for sentence in sentences:
          doc = nlp(sentence.text)
          text = [
              token.text
              for sentence in doc.sentences
              for token in sentence.tokens
          ]
          snippets.append(SentimentDatum(sentence.sentiment, text))
      random.shuffle(snippets)
      return snippets
  
file_path: stanza/stanza/utils/datasets/sentiment/process_ren_chinese.py
imports: import glob
  import os
  import random
  import sys
  import xml.etree.ElementTree
  from collections import namedtuple
  import stanza
  from stanza.models.classifiers.data import SentimentDatum
  import stanza.utils.datasets.sentiment.process_utils
label_desc: Use image node_id 2 for calling a global function with example usage: read_snippets(xml_directory) and returns: snippets