def METHOD_NAME(self):
    if self.process is not None:
        if "Windows" in platform.platform():
            os.kill(self.process.pid, signal.CTRL_BREAK_EVENT)
        else:
            os.killpg(os.getpgid(self.process.pid), signal.SIGTERM)
        os.waitpid(os.getpgid(self.process.pid), 0)
        self.process = None