def METHOD_NAME(self, widget, param, value):
    if hasattr(widget, 'set_text'):
        widget.set_text(str(value))
    elif hasattr(widget, 'set_index'):
        idx = param.valid.index(value)
        widget.set_index(idx)
    elif hasattr(widget, 'set_value'):
        widget.set_value(value)
    elif hasattr(widget, 'set_state'):
        widget.set_state(value)