def apply_identities(self, entity, identities, eprop=None, lprop=None):
    if isinstance(identities, types.GeneratorType):
        identities = list(identities)
    for identity in ensure_list(identities):
        if (eprop is not None):
            entity.add(eprop, identity.entity)
        if (lprop is not None):
            entity.add(lprop, identity.label)
        entity.add('namesMentioned', identity.name)
        entity.add('emailMentioned', identity.email)
def apply_identities(self, entity, identities, eprop=None, lprop=None):
    if isinstance(identities, types.GeneratorType):
        identities = list(identities)
    for identity in ensure_list(identities):
        if (eprop is not None):
            entity.add(eprop, identity.entity)
        if (lprop is not None):
            entity.add(lprop, identity.label)
        entity.add('namesMentioned', identity.name)
        entity.add('emailMentioned', identity.email)