Within Jinja templates, you can use so-called tests. Basically, those are helpers usable in conditions after is
keyword:
{% if loop.index is divisibleby 3 %}
{# ... #}
{% endif %}
All of our filters are implemented in templates.tests module.
There are several widely used builtin tests directly in Jinja.
Checks if size of a collection is higher than 0
Example: items is not_empty
Checks if an object is instance of a certain type / class
Example: parent is of_type "ListQuestion"
💡 The name must be a string; however, it is case-insensitive. It also checks all superclasses.