'This creates one VCard per e-mail address found in UIDs'

@classmethod
def vcards_one_per_uid(cls, keys, vcards, kindhint=None):

    new_vcards = []
    for (key_id, key) in keys.iteritems():
        if cls.key_is_useless(key):
            continue
        for uid in key.get('uids', []):
            email = uid.get('email')
            if email:
                vcls = [cls.key_vcl(key_id, key)]
                if uid.get('name'):
                    vcls.append(VCardLine(name='fn', value=uid['name']))
                if kindhint:
                    vcls += [VCardLine(name='x-mailpile-kind-hint', value=kindhint)]
                card = vcards.get(email)
                if card:
                    card.add(*vcls)
                else:
                    vcls += [VCardLine(name='x-gpg-mrgid', value=email), VCardLine(name='email', value=email)]
                    vcards[email] = card = MailpileVCard(*vcls)
                    new_vcards.append(card)
    return new_vcards
