Common behavior with adding formats to lookup_context for TemplateRenderer and PartialRenderer