<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def connect_combo_data(instance, prop, widget):
 """ Connect a callback property with a QComboBox widget based on the userData. Parameters instance : object The class instance that the callback property is attached to prop : str The name of the callback property widget : QComboBox The combo box to connect. See Also -------- connect_combo_text: connect a callback property with a QComboBox widget based on the text. """


    def update_widget(value):
        try:
            idx = _find_combo_data(widget, value)
        except ValueError:
            if value is None:
                idx = -1
            else:
                raise
        widget.setCurrentIndex(idx)

    def update_prop(idx):
        if idx == -1:
            setattr(instance, prop, None)
        else:
            setattr(instance, prop, widget.itemData(idx))

    add_callback(instance, prop, update_widget)
    widget.currentIndexChanged.connect(update_prop)

    update_widget(getattr(instance, prop))