def callback(self, root, raw):
        tag, attrs = root
        if self._device_handler.perform_qualify_check():
            if tag != qualify("rpc-reply"):
                return
        for key in attrs: # in the <rpc-reply> attributes
            if key == "message-id": # if we found msgid attr
                id = attrs[key] # get the msgid
                with self._lock:
                    try:
                        rpc = self._id2rpc[id] # the corresponding rpc
                        logger.debug("Delivering to %r" % rpc)
                        rpc.deliver_reply(raw)
                    except __HOLE__:
                        raise OperationError("Unknown 'message-id': %s", id)
                    # no catching other exceptions, fail loudly if must
                    else:
                        # if no error delivering, can del the reference to the RPC
                        del self._id2rpc[id]
                        break
        else:
            raise OperationError("Could not find 'message-id' attribute in <rpc-reply>")
dataset/ETHPy150Open ncclient/ncclient/ncclient/operations/rpc.py/RPCReplyListener.callback