Use the new TemplateFunction class.