def unique_data_item_name(name, existing):
    """Accepts a name and a list of existing names and
    returns a name qhich may be modified with a numerical
    suffix such as " (1)", or " (2)", etc in order to avoid
    duplications with the existing names
    """
    base = name
    i = 1
    while name in existing:
        i += 1
        name = "{} ({})".format(base, i)
    return name