I have seen in the stdlib and in some github project. Code like that :
MyClass =
field_id(id) = "{id}_field"
{{
my_func(args) = output
}}
What the interest to have function before the {{ }} block ??
It declares the function as private to the module. Equivalent to:
MyClass = {{
@private
field_id(id) = "{id}_field"
my_func(args) = output
}}