def clean_email(self):
        email = self.cleaned_data['email'].strip()
        if email in self.excluded_emails:
            raise forms.ValidationError(_("A user with this email address is already in "
                                          "this project or has a pending invitation."))
        return email
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/registration/forms.py/AdminInvitesUserForm.clean_email/original