{% comment %}
Renders the header for an option group.
{% endcomment %}
optgroup_header: function(data, escape) {
    {% include "django_tomselect/helpers/decode_if_needed.html" %}

    const safeLabel = escape(decodeIfNeeded(data.label));

    return `<div class="optgroup-header" role="presentation">${safeLabel}</div>`;
},