def find_duplicate_index(candidate, data):
    """Returns the index of the occurrence of candidate in data. If no duplicate, returns -1"""
    i = 0
    for arret in data["stops"]:
        if candidate['properties']['nomlong'] == arret['name']:
            return i
        i += 1
    return -1