def get_session_from_cookie(cookie_val):
 session_id = itsdangerous.Signer(settings.SECRET_KEY).unsign(cookie_val)
 return Session.load(session_id)

def get_session_from_cookie ( cookie_val ) : session_id = itsdangerous . Signer ( settings . SECRET_KEY ) . unsign ( cookie_val ) return Session . load ( session_id )
given a cookie value .