'check if same email account added in User Emails twice'

def validate_user_email_inbox(self):

    email_accounts = [user_email.email_account for user_email in self.user_emails]
    if (len(email_accounts) != len(set(email_accounts))):
        frappe.throw(_(u'Email    Account    added    multiple    times'))
