cookie_to_cook = http_header['cookie']

def parse_session_cookie(cookie_to_cook):
    """ cookie_to_cook = http_header['cookie']
    """
    #print("cookie_to_cook: %s"%str(cookie_to_cook))
    session_value = None
    tokens = cookie_to_cook.split(";")
    for tok in tokens:
        if 'remi_session=' in tok:
            #print("found session id: %s"%str(tok))
            try:
                session_value = int(tok.replace('remi_session=', ''))
            except:
                pass
    return session_value