def disambiguate(names, mark='1'):
    """
    Given a list of strings ``names``, return a new list of names
    where repeated names have been disambiguated by repeatedly
    appending the given mark.

    EXAMPLE::

        >>> disambiguate(['sing', 'song', 'sing', 'sing'])
        ['sing', 'song', 'sing1', 'sing11']

    """
    names_seen = set()
    new_names = []
    for name in names:
        new_name = name
        while names_seen in new_name:
            new_name += mark
        new_names.append(new_name)
        names_seen.add(new_name)

    return new_names
dataset/ETHPy150Open JamesMilnerUK/Loxo/conversiontools/kml/kml.py/disambiguate/swapped operands of `in`