#NEWLINE# def send_with_reply( self , callback , msg ) : #NEWLINE# #INDENT# ' Adds a message id to the message and send it,\n            also registers the callback for the reply.\n        ' #NEWLINE# msg_id = calvinuuid . uuid ( 'MSGID' ) #NEWLINE# self . replies [ msg_id ] = callback #NEWLINE# self . replies_timeout [ msg_id ] = async . DelayedCall ( 10.0 , CalvinCB ( msg . reply_timeout , msg_id ) ) #NEWLINE# msg [ 'msg_uuid' ] = msg_id #NEWLINE# self . send ( msg )