<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def release(data):
 """ Release a session :param data: Information obtained from a POST request. The content type is application/json. The correct packet form should be as follows: { 'token': UUID token from current session start 'command': 'release' } """

    global session
    if not feature_flags.use_protocol_api_v2():
        session.adapter.remove_instrument('left')
        session.adapter.remove_instrument('right')
    else:
        session.adapter.cache_instruments()
    session = None
    return web.json_response({"message": "calibration session released"})