def extract_cookies_to_jar(jar, request, response):
if not (hasattr(response, '<STR_LIT>') and<EOL>response._original_response):<EOL><INDENT>return<EOL><DEDENT>req = MockRequest(request)<EOL>res = MockResponse(response._original_response.msg)<EOL>jar.extract_cookies(res, req)<EOL>
Extract the cookies from the response into a CookieJar.

    :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar)
    :param request: our own requests.Request object
    :param response: urllib3.HTTPResponse object