String removeTrailingNewline(String value) {
        if (value.endsWith(currentState.newline)) {
            value = value.substring(0, value.length() - currentState.newline.length());
        }
        return value;
    }
Gets a list of interceptors that match the given type and for which the
result of {@link CodeInterceptor#isIntercepted(CodeSection)} returns true
when given {@code forSection}.

@param forSection The section that is being intercepted.
@param <S> The type of section being intercepted.
@return Returns the list of matching interceptors.
smithy-utils/src/main/java/software/amazon/smithy/utils/AbstractCodeWriter.java