def get_session(context, key):
    """Gets the key from the session."""
    session_manager = context.session_data_manager
    if not session_manager.hasSessionData():
        return None
    session = session_manager.getSessionData()
    if key not in session.keys():
        return None
    return session[key]
