import re


def get_centroids(cluster_stats_file):
    """Scan {{prefix}}.cluster.stats and fetch the centroid name
    :returns names of the centroids
    """
    pattern = "Cluster:  \d+ of size \d+ with centroid (\w+) with cluster density score"
    with open(cluster_stats_file, 'r') as handle:
        data = handle.read()
        return re.findall(pattern, data)