<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_widget_attrs(self, bound_field, attrs):
 """ Updated the widget attributes which shall be added to the widget when rendering this field. """

        if bound_field.field.has_subwidgets() is False:
            widget_classes = getattr(self, 'widget_css_classes', None)
            if widget_classes:
                if 'class' in attrs:
                    attrs['class'] += ' ' + widget_classes
                else:
                    attrs.update({'class': widget_classes})
        return attrs