code: def get_files(file_paths):
      """Gets a list of file paths given possibly a pattern :attr:`file_paths`.
  
      Adapted from `tf.contrib.slim.data.parallel_reader.get_data_files`.
  
      Args:
          file_paths: A (list of) path to the files. The path can be a pattern,
              e.g., /path/to/train*, /path/to/train[12]
  
      Returns:
          A list of file paths.
  
      Raises:
          ValueError: If no files are not found
      """
      if isinstance(file_paths, (list, tuple)):
          files = []
          for f in file_paths:
              files += get_files(f)
      else:
          if (
              "*" in file_paths
              or "?" in file_paths
              or "[" in file_paths
          ):
              files = tf.gfile.Glob(file_paths)
          else:
              files = [file_paths]
      if not files:
          raise ValueError("No data files found in %s" % (file_paths,))
      return files
  
file_path: texar/texar/tf/utils/utils_io.py
imports: from io import open
  import os
  import importlib
  import yaml
  import tensorflow
label_desc: Use image node_id 7 for calling a global function with example usage: get_files(file_paths) and returns: files