def render_option(self, selected_choices, option_value, option_label):
        if option_value is None:
            option_value = ''
        option_value = force_text(option_value)
        if getattr(self, 'disabledset', None) is not None and getattr(self, 'disabledstr', None) is None:
            self.disabledstr = set([str(x.pk) for x in self.disabledset])
        if getattr(self, 'disabledstr', None) is not None and option_value in self.disabledstr:
            disabled_html = mark_safe(' disabled="disabled"')
        else:
            disabled_html = ''
        if option_value in selected_choices:
            selected_html = mark_safe(' selected="selected"')
            if not self.allow_multiple_selected:
                # Only allow for a single selection.
                selected_choices.remove(option_value)
        else:
            selected_html = ''
        return format_html('<option value="{0}"{1}{2}>{3}</option>',
                           option_value,
                           selected_html,
                           disabled_html,
                           force_text(option_label))
dataset/ETHPy150Open jonge-democraten/dyonisos/subscribe/forms.py/SelectDisabled.render_option/original