#NEWLINE# def send_request( self , request , callback = None ) : #NEWLINE# #INDENT# if ( response is not None ) : #NEWLINE# #INDENT# thread = threading . Thread ( target = self . _thread_body , args = ( request , callback ) ) #NEWLINE# thread . start ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . protocol . send_message ( request ) #NEWLINE# response = self . queue . get ( block = True ) #NEWLINE# return response