code: def get_file_list(data_dir, file_ext):
      """
      Return list of files with the given extension in the data_dir
      """
      file_ext = file_ext if isinstance(file_ext, list) else [file_ext]
      file_names = [
          os.path.join(data_dir, fn)
          for fn in os.listdir(data_dir)
          if any(fn.endswith(ext) for ext in file_ext)
      ]
  
      return file_names
  
file_path: neon/examples/skip-thought/data_loader.py
imports: from __future__ import print_function
  import os
  import h5py
  import json
  import numpy
  from collections import defaultdict, OrderedDict
  import sys
  from neon import logger
  from neon.util.persist import load_obj, save_obj
  from util import tokenize, clean_string
label_desc: Use image node_id 4 for calling a global function with example usage: get_file_list(data_dir, file_ext) and returns: file_names