def _request(self, op):
        logger.info('Requesting %r' % self.__class__.__name__)
        req = self._wrap(op)
        self._session.send(req)
        if self._async:
            logger.debug('Async request, returning %r', self)
            return self
        else:
            logger.debug('Sync request, will wait for timeout=%r' % self._timeout)
            self._event.wait(self._timeout)
            if self._event.isSet():
                if self._error:
                    # Error that prevented reply delivery
                    raise self._error
                self._reply.parse()
                if self._reply.error is not None and not self._device_handler.is_rpc_error_exempt(self._reply.error.message):
                    # <rpc-error>'s [ RPCError ]

                    if self._raise_mode == RaiseMode.ALL or (self._raise_mode == RaiseMode.ERRORS and self._reply.error.severity == "error"):
                        errlist = []
                        errors = self._reply.errors
                        if len(errors) > 1:
                            raise RPCError(to_ele(self._reply._raw), errs=errors)
                        else:
                            raise self._reply.error
                if self._device_handler.transform_reply():
                    return NCElement(self._reply, self._device_handler.transform_reply())
                else:
                    return self._reply
            else:
                raise TimeoutExpiredError('ncclient timed out while waiting for an rpc reply.')
Implementations of :meth:`request` call this method to send the request and process the reply.
dataset/ETHPy150Open ncclient/ncclient/ncclient/operations/rpc.py/RPC._request