def add_listener(self, event_type, callback):
if not self.connected:<EOL><INDENT>time.sleep(<NUM_LIT:1>)<EOL>if self.exception:<EOL><INDENT>raise self.exception<EOL><DEDENT>raise ConnectionError(f"<STR_LIT>")<EOL><DEDENT>thread = get_thread_ident()<EOL>with self.lock:<EOL><INDENT>listener = self.listeners[thread]<EOL><DEDENT>listener.add(event_type, callback)<EOL>self.process_queues()<EOL>
Add a listener for specific event type.
        You'll need to actually listen for changes using the listen method