def find_worst(list_of_values, quantity):
    """
    auxiliary function to changeworst,
    finds the indexes of the worst performing members
    :param list_of_values: list of values relative to the members of the candidate
        used to determine which is the worst performing ones
    :param quantity: the quantity of worst members
    :return: a list with indexes of the worst candidates, to be eliminated
    """
    if len(list_of_values) < quantity:
        raise Exception("Quantity should be lower than the number of models present.")
    worst_list = sorted([i for i in list_of_values if i])[:quantity]
    worst_ind = []
    for worst in worst_list:
        for i in range(len(list_of_values)):
            if list_of_values[i] == worst:
                worst_ind.append(i)
    return list(set(worst_ind))