code: def get_phrases(in_directory):
      in_filenames = [
          os.path.join(in_directory, "amazon_cells_labelled.txt"),
          os.path.join(in_directory, "imdb_labelled.txt"),
          os.path.join(in_directory, "yelp_labelled.txt"),
      ]
  
      lines = []
      for filename in in_filenames:
          lines.extend(open(filename, newline=""))
  
      phrases = []
      for line in lines:
          line = line.strip()
          sentiment = line[-1]
          utterance = line[:-1]
          utterance = utterance.replace("!.", "!")
          utterance = utterance.replace("?.", "?")
          if sentiment == "0":
              sentiment = "0"
          elif sentiment == "1":
              sentiment = "2"
          else:
              raise ValueError(
                  "Unknown sentiment: {}".format(sentiment)
              )
          phrases.append(SentimentDatum(sentiment, utterance))
  
      return phrases
  
imports: import os
  import sys
  from stanza.models.classifiers.data import SentimentDatum
  import stanza.utils.datasets.sentiment.process_utils
label_desc: Use image node_id 1 for calling a global function with example usage: get_phrases(in_directory) and returns: phrases