def _find_combo_data(widget, value):
    """
    Returns the index in a combo box where itemData == value

    Raises a ValueError if data is not found
    """
    i = widget.findData(value)
    if i == -1:
        raise ValueError("%s not found in combo box" % value)
    else:
        return i
dataset/ETHPy150Open glue-viz/glue/glue/utils/qt/widget_properties.py/_find_combo_data/original