code: public ImmutableList<EscapingMode> getEscapingMode(PrintNode printNode) {
      // See if we have already inferred an escaping mode for the node.
      ImmutableList<EscapingMode> escapingModes = nodeToEscapingModes.get(printNode);
      if (escapingModes != null) {
        return escapingModes;
      }
  
      // Look for an escaping mode in the existing directives.
      ImmutableList.Builder<EscapingMode> modes = ImmutableList.builder();
      for (PrintDirectiveNode directiveNode : printNode.getChildren()) {
        // TODO(lukes): it is mostly illegal to add an escaping directive to a template as most have
        // been marked as internalOnly.  See if this can be simplified or deleted.
        EscapingMode mode = EscapingMode.fromDirective(directiveNode.getName());
        if (mode != null) {
          modes.add(mode);
        }
      }
      return modes.build();
    }
docs: Null if there is no escaping mode for the given <code>{print}</code> node.