def get_unique_name(collection, name, spacer='_'):
    """
    Create a unique key for a collection by appending numbers when entries exist
    :param collection: A list, collection, array, ...
    :param name: Name (for instance 'Points')
    :param spacer: Spacer char
    :return: New name, for instance 'Points_4'
    """
    similar_ones = []
    max_value = 0
    if name not in collection:
        return name
    for key in collection:
        if name in key:
            similar_ones.append(key)
            if spacer in key:
                value = key.split(spacer)[1]
                max_value = max(int(value), max_value)
    value = max(len(similar_ones), max_value)
    return f'{name}{spacer}{value}'