docs: private Statement renderIncrementally(
        Expression soyValueProvider, List<PrintDirectiveNode> directives, Label reattachPoint) {
      // In this case we want to render the SoyValueProvider via renderAndResolve which will
      // enable incremental rendering of parameters for lazy transclusions!
      // This actually ends up looking a lot like how calls work so we use the same strategy.
      Statement initRenderee = Statement.NULL_STATEMENT;
      Statement clearRenderee = Statement.NULL_STATEMENT;
      if (!soyValueProvider.isCheap()) {
        FieldRef currentRendereeField = variables.getCurrentRenderee();
        initRenderee = currentRendereeField.putInstanceField(thisVar, soyValueProvider);
        clearRenderee =
            currentRendereeField.putInstanceField(thisVar, constantNull(SOY_VALUE_PROVIDER_TYPE));
        soyValueProvider = currentRendereeField.accessor(thisVar);
      }
      initRenderee = initRenderee.labelStart(reattachPoint);
  
      // TODO(lukes): we should have similar logic for calls and message escaping
      Statement initAppendable = Statement.NULL_STATEMENT;
      Statement clearAppendable = Statement.NULL_STATEMENT;
      Expression appendable = appendableExpression;
      if (!directives.isEmpty()) {
        Label printDirectiveArgumentReattachPoint = new Label();
        AppendableAndOptions wrappedAppendable =
            applyStreamingPrintDirectives(
                directives,
                appendable,
                exprCompiler.asBasicCompiler(printDirectiveArgumentReattachPoint),
                parameterLookup.getPluginContext(),
                variables);
        FieldRef currentAppendableField = variables.getCurrentAppendable();
        initAppendable =
            currentAppendableField
                .putInstanceField(thisVar, wrappedAppendable.appendable())
                .labelStart(printDirectiveArgumentReattachPoint);
        appendable = currentAppendableField.accessor(thisVar);
        clearAppendable =
            currentAppendableField.putInstanceField(
                thisVar, constantNull(LOGGING_ADVISING_APPENDABLE_TYPE));
        if (wrappedAppendable.closeable()) {
          // make sure to call close before clearing
          clearAppendable =
              Statement.concat(
                  // We need to cast because the static type of the field is just plain old
                  // LoggingAdvisingAppendable
                  currentAppendableField
                      .accessor(thisVar)
                      .checkedCast(BytecodeUtils.CLOSEABLE_TYPE)
                      .invokeVoid(MethodRef.CLOSEABLE_CLOSE),
                  clearAppendable);
        }
      }
      Expression callRenderAndResolve =
          soyValueProvider.invoke(
              MethodRef.SOY_VALUE_PROVIDER_RENDER_AND_RESOLVE,
              appendable,
              // the isLast param
              // TODO(lukes): pass a real value here when we have expression use analysis.
              constant(false));
      Statement doCall = detachState.detachForRender(callRenderAndResolve);
      return Statement.concat(initRenderee, initAppendable, doCall, clearAppendable, clearRenderee);
    }