{% set helpers = {'ii': 0} %}

{% for i in range(0, sizes.classes) %}
  {% for j in range(i + 1, sizes.classes) %}
        votes[decisions[{{ helpers.ii }}] > 0 ? {{ i }} : {{ j }}] += 1;
        {% if helpers.update({'ii': helpers.ii + 1}) %}{% endif %}
   {% endfor %}
{% endfor %}