#NEWLINE# def handle_response( self , response , max_age ) : #NEWLINE# #INDENT# def callback( body ) : #NEWLINE# #INDENT# return self . signer . loads ( body , max_age = max_age ) #NEWLINE# #UNINDENT# def errback( fail ) : #NEWLINE# #INDENT# message = fail . value . message #NEWLINE# status_code = fail . value . status #NEWLINE# self . raise_for_status ( int ( status_code ) , message ) #NEWLINE# #UNINDENT# response . addCallback ( callback ) #NEWLINE# response . addErrback ( errback ) #NEWLINE# return response