def apply_select2(widget_cls):
cname = '<STR_LIT>' % widget_cls.__name__<EOL>return type(cname, (Select2Mixin, widget_cls), {})<EOL>
Dynamically create new widget class mixed with Select2Mixin.

Args:
    widget_cls: class of source widget.

Usage, for example::

    class SomeModelForm(admin.ModelForm):
        class Meta:
            widgets = {
                'field': apply_select2(forms.Select),
            }

So, `apply_select2(forms.Select)` will return new class,
named Select2Select.