code: def resolve_files(path_or_dir):
      """Returns the file paths for `path_or_dir`.
  
      Args:
          path_or_dir: String or list of strings for the paths or directories to
              run predictions in. For directories, will return all the files
              within.
  
      Returns:
          List of strings with the full path for each file.
      """
      if not isinstance(path_or_dir, tuple):
          path_or_dir = (path_or_dir,)
  
      paths = []
      for entry in path_or_dir:
          if tf.gfile.IsDirectory(entry):
              paths.extend(
                  [
                      os.path.join(entry, f)
                      for f in tf.gfile.ListDirectory(entry)
                      if get_file_type(f) in ("image", "video")
                  ]
              )
          elif get_file_type(entry) in ("image", "video"):
              if not tf.gfile.Exists(entry):
                  click.echo(
                      "Input {} not found, skipping.".format(entry)
                  )
                  continue
              paths.append(entry)
  
      return paths
  
file_path: luminoth/luminoth/predict.py
imports: import click
  import json
  import numpy
  import os
  import skvideo.io
  import sys
  import time
  import tensorflow
  from PIL import Image
  from luminoth.tools.checkpoint import get_checkpoint_config
  from luminoth.utils.config import get_config, override_config_params
  from luminoth.utils.predicting import PredictorNetwork
  from luminoth.vis import build_colormap, vis_objects
label_desc: Use image node_id 2 for calling a global function with example usage: resolve_files(path_or_dir) and returns: paths