def METHOD_NAME(packages_path, cached=True) -> List[dict]:
    # Get folders with corresponding components installed
    installed_folders = [folder for folder in covmat_folders if
                         os.path.exists(
                             folder.format(**{packages_path_input: packages_path}))]
    covmats_database_fullpath = os.path.join(get_cache_path(), _covmats_file)
    # Check if there is a usable cached one
    if cached:
        try:
            with open(covmats_database_fullpath, "rb") as f:
                covmat_database = pickle.load(f)
            # quick and dirty hash for regeneration: check number of .covmat files
            num_files = len(list(chain(
                *[[filename for filename in os.listdir(
                    folder.format(**{packages_path_input: packages_path}))
                   if filename.endswith(Extension.covmat)]
                  for folder in installed_folders])))
            assert num_files == len(covmat_database)
            log.debug("Loaded cached covmats database")
            return covmat_database
        except:
            log.info("No cached covmat database present, not usable or not up-to-date. "
                     "Will be re-created and cached.")
            pass
    # Create it (again)
    covmat_database = []
    for folder in installed_folders:
        folder_full = folder.format(
            **{packages_path_input: packages_path}).replace("/", os.sep)
        for filename in os.listdir(folder_full):
            try:
                with open(os.path.join(folder_full, filename),
                          encoding="utf-8") as covmat:
                    header = covmat.readline()
                assert header.strip().startswith("#")
                params = header.strip().lstrip("#").split()
            except:
                continue
            covmat_database.append({"folder": folder, "name": filename, "params": params})
    if cached:
        with open(covmats_database_fullpath, "wb") as f:
            pickle.dump(covmat_database, f)
    return covmat_database