def METHOD_NAME(self, *args):
    result = {"ok": False}
    if self.command_in_progress is not None:
        try:
            self.command_in_progress.terminate()
            self.__previous_stderr = b""
            self.__previous_stdout = b""
            result.update({"ok": True})
        except Exception as e:
            log.exception(e)
            result["error"] = str(e)
    else:
        result["error"] = "Process for termination not found."
    return result