@SuppressWarnings("unchecked")
    public final T writeDocs(Runnable runnable) {
        pushState();
        documentationWriter.writeDocs((T) this, runnable);
        popState();
        return (T) this;
    }
Writes documentation comments.

<p>This method is responsible for setting up the writer to begin
writing documentation comments. This includes writing any necessary
opening tokens (e.g., "/*"), adding tokens to the beginning of lines
(e.g., "*"), sanitizing documentation strings, and writing any
tokens necessary to close documentation comments (e.g., "*\/").

<p>This method <em>does not</em> automatically escape the expression
start character ("$" by default). Write calls made by the Runnable
should either use {@link AbstractCodeWriter#writeWithNoFormatting} or escape
the expression start character manually.

<p>This method may be overridden as needed.

@param runnable Runnable that handles actually writing docs with the writer.
@return Returns the writer.
smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/writer/CodegenWriter.java