{% macro legend(tier_order, tier_labels, tier_colors, state_colors) %}
{% for tier in tier_order %} {{ tier_labels[tier] }} {% endfor %} {% for state, color in state_colors.items() %} {{ state|capitalize }} {% endfor %}
{% endmacro %}