code: def _request(self, op):
          
          self.logger.info('Requesting %r', self.__class__.__name__)
          req = self._wrap(op)
          self._session.send(req)
          if self._async:
              self.logger.debug('Async request, returning %r', self)
              return self
          else:
              self.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.')
docs: Implementations of :meth:`request` call this method to send the request and process the reply.
  
          In synchronous mode, blocks until the reply is received and returns :class:`RPCReply`. Depending on the :attr:`raise_mode` a `rpc-error` element in the reply may lead to an :exc:`RPCError` exception.
  
          In asynchronous mode, returns immediately, returning `self`. The :attr:`event` attribute will be set when the reply has been received (see :attr:`reply`) or an error occured (see :attr:`error`).
  
          *op* is the operation to be requested as an :class:`~xml.etree.ElementTree.Element`