How to give users a user role based on their email in Python?

Solution
def get_role(email):
       check_email = "test@testing.com"
       if email == check_email:
           return "admin"
       else:
           return "user"