def disambiguate(label, labels):
    label = label.replace(' ', '_')
    if label not in labels:
        return label
    suffix = 1
    while label + ('_%i' % suffix) in labels:
        suffix += 1
    return label + ('_%i' % suffix)
Changes name of label if it conflicts with labels list
dataset/ETHPy150Open glue-viz/glue/glue/dialogs/custom_component/qt/widget.py/disambiguate