def email_or_username__to__email(email_or_username):
try:<EOL><INDENT>user = User.objects.get(username=email_or_username)<EOL>return user.email<EOL><DEDENT>except User.DoesNotExist:<EOL><INDENT>return email_or_username<EOL><DEDENT>
Convert email_or_username to email.

Returns:
    str: If `email_or_username` was a username returns user's email, otherwise assumes it was an email and returns
         as is.