def clear_per_request_session(event):
    # delete transient data stored in the session
    # this ensures a clean slate for the next request.
    s = event.request.session
    if 'message' in s:
        del s['message']
    if 'users.id' not in s:
        s['users.id'] = None

    return 0
dataset/ETHPy150Open sjuxax/raggregate/raggregate/subscribers.py/clear_per_request_session/original