def response_hook(self, r, **kwargs):
if r.status_code == <NUM_LIT>:<EOL><INDENT>www_authenticate = r.headers.get('<STR_LIT>', '<STR_LIT>').lower()<EOL>auth_type = _auth_type_from_header(www_authenticate)<EOL>if auth_type is not None:<EOL><INDENT>return self.retry_using_http_NTLM_auth(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>r,<EOL>auth_type,<EOL>kwargs<EOL>)<EOL><DEDENT><DEDENT>elif r.status_code == <NUM_LIT>:<EOL><INDENT>proxy_authenticate = r.headers.get(<EOL>'<STR_LIT>', '<STR_LIT>'<EOL>).lower()<EOL>auth_type = _auth_type_from_header(proxy_authenticate)<EOL>if auth_type is not None:<EOL><INDENT>return self.retry_using_http_NTLM_auth(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>r,<EOL>auth_type,<EOL>kwargs<EOL>)<EOL><DEDENT><DEDENT>return r<EOL>
The actual hook handler.