example_itemplatehelpers use a function not a method

It's not a good idea for template helper functions to be class methods,
because self is not thread-safe.