def clean_email(self):
        email = self.cleaned_data['email']

        user = get_user(email)
        if user:
            if user.is_closed:
                invite_user_to_reactivate_account(user, request=self.request)
                raise forms.ValidationError(
                    _('This email address is already registered to another '
                      '(closed) account. To reactivate this account, '
                      'please check your email inbox. To register a new '
                      'account, please use a different email address.'),

                    code='email_registered_to_closed_account'
                )

            else:
                raise forms.ValidationError(
                    _('Sorry, this email address is already '
                        'registered to another user.'),

                    code='email_already_registered'
                )

        return email
:rtype: None
dataset/ETHPy150Open nlhkabu/connect/connect/accounts/forms.py/RequestInvitationForm.clean_email--crossover with--dataset/ETHPy150Open algorhythms/LeetCode/232 Implement Queue using Stacks.py/Queue.pop