code: def execute_command(self, req, **kwargs):
          if isinstance(req, string_types):
              timeout = 50
              wait = True
              asynchronous = False
              for key in kwargs:
                  if key == 'wait':
                      wait = kwargs[key]
                  elif key == 'timeout':
                      timeout = kwargs[key]
                  elif key == 'asynchronous':
                      asynchronous = kwargs[key]
              req = CliRequest(req,
                               timestamp=self.get_time(),
                               wait=wait,
                               timeout=timeout,
                               asynchronous=asynchronous)
          if req.wait:
              response = self._wait_for_exec_ready()
              if response is not None and self.query_async_expected is not None:
                  if response.retcode != self.query_async_expected:
                      self.logger.error("Asynch call returned unexpected result, "
                                        "expected %d was %d", self.query_async_expected,
                                        response.retcode)
                      raise TestStepFail("Asynch call returned unexpected result")
                  self.query_async_expected = None
          self.response_received.clear()
          self.query_timeout = self.get_time() + req.timeout if req.wait else 0
          self.query = req
          msg = "Async CMD {}, " \
                "timeout={}, time={}" if req.asynchronous else "CMD {}, timeout={}, time={}"
          msg = msg.format(req.cmd, int(self.query_timeout), int(self.get_time()))
          self.logger.debug(msg, extra={'type': '<->'})
          Dut.process_dut(self)
          if req.asynchronous is True:
              self.query_async_expected = req.expected_retcode
              async_response = CliAsyncResponse(self)
              self.query_async_response = async_response
              return async_response
          if req.wait is False:
              self.query_async_expected = req.expected_retcode
              if self.query_async_response is not None:
                  self.query_async_response.set_response(CliResponse())
              self.query_async_response = None
              return CliResponse()
          return self._wait_for_exec_ready()