def register(self, widget_class):
    self._widgets[widget_class.widget_type] = widget_class
    return widget_class
def register(self, widget_class):
    self._widgets[widget_class.widget_type] = widget_class
    return widget_class