code: private Optional<Expression> asRawTextOnly(String name, RenderUnitNode renderUnit) {
      StringBuilder builder = null;
      List<SoyNode> children = new ArrayList<>(renderUnit.getChildren());
      for (int i = 0; i < children.size(); i++) {
        SoyNode child = children.get(i);
        if (child instanceof MsgHtmlTagNode) {
          // by the time MsgHtmlTagNodes hit the code generator the HtmlTagNode instances they wrap
          // have been desugared into RawTextNodes (and other things).
          children.addAll(i + 1, ((MsgHtmlTagNode) child).getChildren());
          continue;
        }
        if (child instanceof RawTextNode) {
          if (builder == null) {
            builder = new StringBuilder();
          }
          builder.append(((RawTextNode) child).getRawText());
        } else {
          return Optional.absent();
        }
      }
  
      SanitizedContentKind kind = renderUnit.getContentKind();
      Expression value = constant(builder == null ? "" : builder.toString(), parentVariables);
      if (kind == null) {
        value = MethodRef.STRING_DATA_FOR_VALUE.invoke(value);
      } else {
        value =
            MethodRef.ORDAIN_AS_SAFE.invoke(value, constantSanitizedContentKindAsContentKind(kind));
      }
  
      FieldRef staticField = parentVariables.addStaticField(name, value);
      return Optional.of(staticField.accessor());
    }
docs: Returns an SoyValueProvider expression for the given RenderUnitNode if it is composed of only
  raw text.