def METHOD_NAME(self, raise_exception=True):
    returncode = self.server_process.poll()
    if returncode is not None:
        if raise_exception:
            raise SubprocessDiedError(
                "Process has already exited. Stderr: %s"
                % (self.server_process.stderr.read())
            )
        return False
    return True