def split_cookie(app, rv):
    signer = Signer(app.secret_key)
    cookie_data = rv.headers['Set-Cookie'].split(';', 1)[0]

    for cookie in cookie_data.split('&'):
        name, value = cookie_data.split('=')

        if name == app.session_cookie_name:
            unsigned_value = signer.unsign(value)
            sid, created = unsigned_value.split(b('_'))
            return sid.decode('ascii'), int(created, 16)
dataset/ETHPy150Open mbr/flask-kvsession/tests/test_flask_kvsession.py/split_cookie/original