code: def _file_and_exists(val, input_files):
      
      return ((os.path.exists(val) and os.path.isfile(val)) or
              val in input_files)
docs: Check if an input is a file and exists.
  
      Checks both locally (staged) and from input files (re-passed but never localized).