docs: private SoyValue applyDirective(
        SoyPrintDirective directive, SoyValue value, List<SoyValue> args, SoyNode node) {
  
      // Get directive.
      if (!(directive instanceof SoyJavaPrintDirective)) {
        throw RenderException.createWithSource(
            "Failed to find Soy print directive with name '"
                + directive
                + "'"
                + " (tag "
                + node.toSourceString()
                + ")",
            node);
      }
  
      // TODO: Add a pass to check num args at compile time.
      if (!directive.getValidArgsSizes().contains(args.size())) {
        throw RenderException.createWithSource(
            "Print directive '"
                + directive
                + "' used with the wrong number of arguments (tag "
                + node.toSourceString()
                + ").",
            node);
      }
  
      try {
        return ((SoyJavaPrintDirective) directive).applyForJava(value, args);
      } catch (RuntimeException e) {
        throw RenderException.createWithSource(
            String.format(
                "Failed in applying directive '%s' in tag \"%s\" due to exception: %s",
                directive, node.toSourceString(), e.getMessage()),
            e,
            node);
      }
    }