code: def render(self, name=None, value=None, attrs=None):
          
          attrs = {} or attrs
          self.attrs = attrs
          self.name = name
          self.value = value
  
          id_ = self.attrs.get('id')
          output = []
          for i, choice in enumerate(self.choices):
              choice_value, choice_label = choice
              if isinstance(choice_label, (tuple, list)):
                  attrs_plus = self.attrs.copy()
                  if id_:
                      attrs_plus['id'] += '_{}'.format(i)
                  sub_ul_renderer = self.__class__(
                      attrs=attrs_plus,
                      choices=choice_label,
                  )
                  sub_ul_renderer.choice_input_class = self.choice_input_class
                  output.append(html.format_html(
                      self.inner_html, choice_value=choice_value,
                      sub_widgets=sub_ul_renderer.render(),
                  ))
              else:
                  w = self.choice_input_class(
                      self.name, self.value, self.attrs.copy(), choice, i)
                  output.append(html.format_html(
                      self.inner_html,
                      choice_value=force_text(w),
                      sub_widgets=''))
          return html.format_html(
              self.outer_html,
              id_attr=html.format_html(' id="{}"', id_) if id_ else '',
              content=mark_safe('\n'.join(output)),
          )
docs: Outputs a <ul> for this set of choice fields.
  
          If an id was given to the field, it is applied to the <ul> (each
          item in the list will get an id of `$id_$i`).