code: def find_first_file_with_ext(base_paths, prefix, exts):
      
      for base_path in base_paths:
          for ext in exts:
              filename = os.path.join(base_path, "%s%s" % (prefix, ext))
              if os.path.exists(filename) and os.path.isfile(filename):
                  logger.debug("Found first file with relevant extension: %s", filename)
                  return base_path, ext
  
      logger.debug("No files found for prefix %s, extensions %s", prefix, ", ".join(exts))
      return None, None
docs: Runs through the given list of file extensions and returns the first file with the given base
      path and extension combination that actually exists.
  
      Args:
          base_paths: The base paths in which to search for files.
          prefix: The filename prefix of the file for which to search.
          exts: An ordered list of file extensions for which to search.
  
      Returns:
          On success, a 2-tuple containing the base path in which the file was found, and the extension of the file.
          On failure, returns (None, None).