def METHOD_NAME(self):
    super().METHOD_NAME()
    # make sure we can use write_pipe() immediately after this returns
    self._event.wait()
    if self._stopped:
        # something went wrong (maybe another instance is running)
        raise NamedPipeServerError("Setting up named pipe failed")