def get_listener_instance(self, cls):
        with self._lock:
            for listener in self._listeners:
                if isinstance(listener, cls):
                    return listener
If a listener of the specified type is registered, returns the
dataset/ETHPy150Open ncclient/ncclient/ncclient/transport/session.py/Session.get_listener_instance