{% if tree['left'][i] != tree['right'][i] %}
    if (x[{{ tree['features'][i] }}] <= {{ tree['thresholds'][i] }}) {
        {% with i = tree['left'][i] %}
            {% include 'randomforest/tree.jinja' %}
        {% endwith %}
    }
    else {
        {% with i = tree['right'][i] %}
            {% include 'randomforest/tree.jinja' %}
        {% endwith %}
    }
{% else %}
    votes[{{ tree['classes'][i].argmax() }}] += 1;
{% endif %}