code: def get_valid_user_by_email(email):
      
      user = get_user(email)
      if user:
          if user.valid is False:
              return Err("user not valid")
          return Ok(user)
      return Err("user not exists")
docs: Return user instance