#NEWLINE# def subscribe( self , client_id , topic , callback , msg_type = None ) : #NEWLINE# #INDENT# ' Subscribe to a topic\n\n        Keyword arguments:\n        client_id -- the ID of the client making this subscribe request\n        topic     -- the name of the topic to subscribe to\n        callback  -- the callback to call for incoming messages on the topic\n        msg_type  -- (optional) the type of the topic\n\n        ' #NEWLINE# if ( not ( topic in self . _subscribers ) ) : #NEWLINE# #INDENT# self . _subscribers [ callback ] = MultiSubscriber ( topic , msg_type ) #NEWLINE# #UNINDENT# if ( msg_type is not None ) : #NEWLINE# #INDENT# self . _subscribers [ topic ] . verify_type ( msg_type ) #NEWLINE# #UNINDENT# self . _subscribers [ topic ] . subscribe ( client_id , callback )