#NEWLINE# def AddResponse( self , throttle_name , res ) : #NEWLINE# #INDENT# 'Add to bandwidth throttle for given response.\n\n    Args:\n      throttle_name: The name of the bandwidth throttle to add to.\n      res: The response whose size will be added to the throttle.\n    ' #NEWLINE# content = res . read ( ) #NEWLINE# def ReturnContent( ) : #NEWLINE# #INDENT# return content #NEWLINE# #UNINDENT# res . read = ReturnContent #NEWLINE# size = len ( headers ) #NEWLINE# headers = res . info ( ) #NEWLINE# for ( key , value ) in headers . items ( ) : #NEWLINE# #INDENT# size += len ( ( '%s: %s\n' % ( key , value ) ) ) #NEWLINE# #UNINDENT# self . throttle . AddTransfer ( throttle_name , size )