def get_validated_emails(emails: Iterable[str]) -> List[str]:
    for email in emails:
        if (not isinstance(email, str)):
            raise JsonableError(_('Recipient lists may contain emails or user IDs, but not both.'))
    return list(filter(bool, {email.strip() for email in emails}))
def get_validated_emails(emails: Iterable[str]) -> List[str]:
    for email in emails:
        if (not isinstance(email, str)):
            raise JsonableError(_('Recipient lists may contain emails or user IDs, but not both.'))
    return list(filter(bool, {email.strip() for email in emails}))