def select2_modelform(<EOL>model, attrs=None, form_class=es2_forms.FixedModelForm):
classname = '<STR_LIT>' % model._meta.object_name<EOL>meta = select2_modelform_meta(model, attrs=attrs)<EOL>return type(classname, (form_class,), {'<STR_LIT:Meta>': meta})<EOL>
Return ModelForm class for model with select2 widgets.

Arguments:
    attrs: select2 widget attributes (width, for example) of type `dict`.
    form_class: modelform base class, `forms.ModelForm` by default.

::

    SomeModelForm = select2_modelform(models.SomeModelBanner)

is the same like::

    class SomeModelForm(forms.ModelForm):
        Meta = select2_modelform_meta(models.SomeModelForm)