<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def condition(self) -> bool:
 """ check JWT, then check session for validity """

        jwt = JWT()
        if jwt.verify_http_auth_token():
            if not current_app.config['AUTH']['FAST_SESSIONS']:
                session = SessionModel.where_session_id(
                    jwt.data['session_id'])
                if session is None:
                    return False
            Session.set_current_session(jwt.data['session_id'])
            return True
        return False