#NEWLINE# def register_watcher( self , event_type , callback , register_timeout = None ) : #NEWLINE# #INDENT# '\n        Register a callback for a given event type.\n        ' #NEWLINE# self . _push_watchers [ event_type ] . add ( event_type ) #NEWLINE# self . wait_for_response ( RegisterMessage ( event_list = [ event_type ] ) , timeout = register_timeout )