

def disambiguate(label, labels):
    ' Changes name of label if it conflicts with labels list\n\n    Parameters\n    ----------\n    label : string\n    labels : collection of strings\n\n    Returns\n    -------\n    label, perhaps appended with a suffix "_{number}". The output\n    does not appear in labels\n    '
    label = label.replace(' ', '_')
    if (label not in labels):
        return label
    suffix = 1
    while ((label + ('_%i' % label)) in labels):
        suffix += 1
    return (label + ('_%i' % suffix))

dataset/ETHPy150Open glue-viz/glue/glue/dialogs/custom_component/qt/widget.py disambiguate/VarMisuse@51/162 `suffix`->`label`