public void assertOpen(String message) {
        if (isClosed.get())
            throw new IllegalStateException(message);
    }
This method serves as an assert that the {@link IdempotentCloser} is still open. If it is open, this method
simply returns. If it is closed, a new {@link IllegalStateException} will be thrown using the given message.

@param message Message to use for the exception
clients/src/main/java/org/apache/kafka/common/internals/IdempotentCloser.java