Compute a score for each follower that is sum_i (1/n_i), where n_i is the degree of the ith exemplar they follow.
    The score for a brand is then the average of their follower scores.

def rarity(brands, exemplars):
    """ Compute a score for each follower that is sum_i (1/n_i), where n_i is the degree of the ith exemplar they follow.
    The score for a brand is then the average of their follower scores."""
    rarity = compute_rarity_scores(exemplars)
    scores = {}
    for brand, followers in brands:
        scores[brand] = sum(rarity[f] for f in followers) / len(followers)
    return scores