code: def list_wikipedia_files(input_dir):
      """
      Get a list of wiki files under the input_dir
  
      Recursively traverse the directory, then sort
      """
      if not os.path.isdir(input_dir) and os.path.split(input_dir)[
          1
      ].startswith("wiki_"):
          return [input_dir]
  
      wiki_files = []
  
      recursive_files = deque()
      recursive_files.extend(glob.glob(os.path.join(input_dir, "*")))
      while len(recursive_files) > 0:
          next_file = recursive_files.pop()
          if os.path.isdir(next_file):
              recursive_files.extend(
                  glob.glob(os.path.join(next_file, "*"))
              )
          elif os.path.split(next_file)[1].startswith("wiki_"):
              wiki_files.append(next_file)
  
      wiki_files.sort()
      return wiki_files
  
file_path: stanza/stanza/utils/datasets/constituency/selftrain_wiki.py
imports: import argparse
  from collections import deque
  import glob
  import os
  import random
  from stanza.models.common.foundation_cache import FoundationCache
  from stanza.utils.datasets.constituency import selftrain
  from stanza.utils.get_tqdm import get_tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: list_wikipedia_files(input_dir) and returns: wiki_files, list