<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def badge_form(model):
    '''A form factory for a given model badges'''
    class BadgeForm(ModelForm):
        model_class = Badge

        kind = fields.RadioField(
            _('Kind'), [validators.DataRequired()],
            choices=model.__badges__.items(),
            description=_('Kind of badge (certified, etc)'))

    return BadgeForm