public DocWriter openHeading(String content) {
        headingDepth++;
        if (headingDepth > MAX_HEADING_DEPTH) {
            throw new CodegenException(String.format(
                    "Tried opening a heading nested more deeply than the max depth of %d.",
                    MAX_HEADING_DEPTH));
        }
        return openHeading(content, headingDepth);
    }
Writes a heading with the given content.

<p>{@link #closeHeading} will be called to enable cleaning up any resources or
context this method creates.

@param content A string to use as the heading content.
@return returns the writer.
smithy-docgen/src/main/java/software/amazon/smithy/docgen/writers/DocWriter.java