

def get_widget_class(descriptor, widget_type=None, widget_use=None, return_default=True):
    reg = get_module_registry()
    cls = reg.get_constant_config_widget(descriptor, widget_type, descriptor)
    prefix = get_prefix(reg, descriptor)
    if ((cls is None) and return_default):
        if ((descriptor.module is not None) and hasattr(descriptor.module, 'get_widget_class')):
            cls = descriptor.module.get_widget_class()
        if (cls is None):
            if (widget_type == 'enum'):
                return StandardConstantEnumWidget
            else:
                return StandardConstantWidget
    return load_cls(cls, prefix)

dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/modules/utils.py get_widget_class/VarMisuse@38/54 `widget_use`->`descriptor`