code: def filename_items_for_filetype(filenames, filetype_info):
          
          matched_files = []
          for pattern in filetype_info['file_patterns']:
              for filename in match_filenames(filenames, pattern):
                  if filename in matched_files:
                      continue
                  try:
                      filename_info = parse(
                          pattern, get_filebase(filename, pattern))
                  except ValueError:
                      logger.debug("Can't parse %s with %s.", filename, pattern)
                      continue
                  matched_files.append(filename)
                  yield filename, filename_info
docs: Iterator over the filenames matching *filetype_info*.