code: function fixTemplateContext(template, fix) {
      var _template_r = template.r;
      template.r = function(contextStack) {
          var context = contextStack[contextStack.length-1];
          contextStack[contextStack.length-1] = fix(context);
          return _template_r.apply(this,arguments);
      };
  }
docs: Override the `template.r()` method of the `Hogan.Template`.
  to modify/replace the context at the top of the stack.
  
  This may be brittle, as `.r()` might be considered an internal method.