code: def get_list_of_files(top_path):
      result = {}
      for path, _dirs, files in os.walk(top_path):
          for filename in files:
              if filename.endswith(".xml"):
                  full_filename = os.path.realpath(
                      os.path.join(path, filename)
                  )
                  assert PathManager.exists(full_filename), (
                      "Bad file " + full_filename
                  )
                  movie_id = get_movie_id(full_filename)
                  if movie_id not in result:
                      result[movie_id] = []
                  result[movie_id].append(full_filename)
      return result
  
imports: import parlai.core.build_data
  import glob
  import gzip
  import multiprocessing
  import os
  import re
  import sys
  import time
  import tqdm
  import xml.etree.ElementTree
  from parlai.core.build_data import DownloadableFile
  from parlai.utils.io import PathManager
label_desc: Use image node_id 2 for calling a global function with example usage: get_list_of_files(top_path) and returns: result