code: def update_widget_attrs(self, bound_field, attrs):
          
          bound_field.form.update_widget_attrs(bound_field, attrs)
          widget_classes = self.widget.attrs.get('class', None)
          if widget_classes:
              if 'class' in attrs:
                  attrs['class'] += ' ' + widget_classes
              else:
                  attrs.update({'class': widget_classes})
          return attrs
docs: Update the dictionary of attributes used  while rendering the input widget