Return the proportion of a brand's followers who also follower an
    exemplar. We merge all exemplar followers into one big pseudo-account.

def cosine_merge(brands, exemplars):
    """ Return the proportion of a brand's followers who also follower an
    exemplar. We merge all exemplar followers into one big pseudo-account."""
    scores = {}
    exemplar_followers = set()
    for followers in exemplars.values():
        exemplar_followers |= followers

    for brand, followers in brands:
        scores[brand] = _cosine(followers, exemplar_followers)
    return scores