def METHOD_NAME(self) -> None:
    if not self.isRunning():
        return
    assert self._process is not None, "Unexpected self._process is None even though it is running."
    signals = [signal.SIGINT] * 10 + [signal.SIGTERM] * 10 + [signal.SIGKILL] * 10
    for signal0 in signals:
        self._process.send_signal(signal0)
        try:
            self._process.wait(timeout=0.02)
            return
        except:
            pass