def is_valid(self, session_key):
try:<EOL><INDENT>self.check_valid(session_key)<EOL>return True<EOL><DEDENT>except InvalidSessionException:<EOL><INDENT>return False<EOL><DEDENT>
if the session doesn't exist, _lookup_required_session raises