<commit_before>{% macro radios(
  field,
  hint=None,
  disable=[],
  option_hints={},
  hide_legend=False
) %}
  <div class="form-group {% if field.errors %} form-group-error{% endif %}">
    <fieldset>
      <legend class="form-label">
        {% if hide_legend %}<span class="visually-hidden">{% endif %}
          {{ field.label.text|safe }}
        {% if hide_legend %}</span>{% endif %}
        {% if field.errors %}
          <span class="error-message" data-module="track-error" data-error-type="{{ field.errors[0] }}" data-error-label="{{ field.name }}">
            {{ field.errors[0] }}
          </span>
        {% endif %}
      </legend>
      {% for option in field %}
        {{ radio(option, disable, option_hints) }}
      {% endfor %}
    </fieldset>
  </div>
{% endmacro %}


{% macro radio(option, disable=[], option_hints={}) %}
  <div class="multiple-choice">
    <input
      id="{{ option.id }}" name="{{ option.name }}" type="radio" value="{{ option.data }}"
      {% if option.data in disable %}
        disabled
      {% endif %}
      {% if option.checked %}
        checked
      {% endif %}
    ><commit_msg>Refactor radios for reuse<commit_after>{% macro radios(
  field,
  hint=None,
  disable=[],
  option_hints={},
  hide_legend=False
) %}
  {% call radios_wrapper(
    field, hint, disable, option_hints, hide_legend
  ) %}
    {% for option in field %}
      {{ radio(option, disable, option_hints) }}
    {% endfor %}
  {% endcall %}
{% endmacro %}

{% macro radios_wrapper(field, hint=None, disable=[], option_hints={}, hide_legend=False) %}
  <div class="form-group {% if field.errors %} form-group-error{% endif %}">
    <fieldset>
      <legend class="{{ 'form-label' if not hide_legend else '' }}">
        {% if hide_legend %}<span class="visually-hidden">{% endif %}
          {{ field.label.text|safe }}
        {% if hide_legend %}</span>{% endif %}
        {% if field.errors %}
          <span class="error-message" data-module="track-error" data-error-type="{{ field.errors[0] }}" data-error-label="{{ field.name }}">
            {{ field.errors[0] }}
          </span>
        {% endif %}
      </legend>
      {{ caller() }}
    </fieldset>
  </div>
{% endmacro %}

{% macro radio(option, disable=[], option_hints={}) %}
  <div class="multiple-choice">
    <input
      id="{{ option.id }}" name="{{ option.name }}" type="radio" value="{{ option.data }}"
      {% if option.data in disable %}
        disabled
      {% endif %}
      {% if option.checked %}
        checked
      {% endif %}
    >
{'fraction_non_alphanumeric': 0.19693997646135739, 'fraction_numerical': 0.001569242840329541, 'mean_word_length': 2.591549295774648, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4994235', 'n_tokens_mistral': 889, 'n_tokens_neox': 782, 'n_words': 174}