code: def get_phrases_from_directory(directory):
      phrases = []
      inpath = os.path.join(
          directory,
          "arguana-tripadvisor-annotated-v2",
          "split",
          "training",
          "*",
          "*xmi",
      )
      for filename in glob.glob(inpath):
          phrases.extend(get_phrases(filename))
      return phrases
  
file_path: stanza/stanza/utils/datasets/sentiment/process_arguana_xml.py
imports: from collections import namedtuple
  import glob
  import os
  import sys
  import xml.etree.ElementTree
  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: get_phrases_from_directory(directory) and returns: phrases