@SuppressWarnings("unchecked")
    public T insertTrailingNewline(boolean trailingNewline) {
        this.trailingNewline = trailingNewline;
        return (T) this;
    }
Configures the AbstractCodeWriter to always append a newline at the end of
the text if one is not already present.

<p>This setting is not captured as part of push/popState.

@param trailingNewline True if a newline is added.

@return Returns self.
smithy-utils/src/main/java/software/amazon/smithy/utils/AbstractCodeWriter.java