def write_relevant_features_to_file(fname, clusters, cluster_dict, feature_dict, feature_count=5):
    """
    Writes the features with the highest weight in each cluster to a file

    Parameters
    ----------
    fname: str
    clusters: int
        Number of clusters
    cluster_dict: dict
        dict of dicts. for each cluster, maps feature index to weight
    feature_dict: dict
        Maps index to word
    feature_count: int
        Number of features to report

    Returns
    -------
    None
    """
    with open(fname, "w") as F:
        for i in range(clusters):
            j = 0
            for k, v in cluster_dict[i].items():
                F.write(f"{feature_dict[k]} ({round(v, 3)})")
                j += 1
                if j >= feature_count:
                    F.write("\n")
                    break
                F.write(", ")
    return None