'Returns a string of space-separated CSS classes for the wrapping element of this input field.'

def css_classes(self, extra_classes=None):

    if hasattr(extra_classes, u'split'):
        extra_classes = extra_classes.split()
    extra_classes = set((extra_classes or []))
    field_css_classes = getattr(self.form, u'field_css_classes', None)
    if hasattr(field_css_classes, u'split'):
        extra_classes.update(field_css_classes.split())
    elif isinstance(field_css_classes, (list, tuple)):
        extra_classes.update(field_css_classes)
    elif isinstance(field_css_classes, dict):
        extra_field_classes = []
        for key in (u'*', self.name):
            css_classes = field_css_classes.get(key)
            if hasattr(css_classes, u'split'):
                extra_field_classes = css_classes.split()
            elif isinstance(css_classes, (list, tuple)):
                if (u'__default__' in css_classes):
                    css_classes.remove(u'__default__')
                    extra_field_classes.extend(css_classes)
                else:
                    extra_field_classes = css_classes
        extra_classes.update(extra_field_classes)
    return super(NgBoundField, self).css_classes(extra_classes)
