def cv_to_fold(cv,num_ins):
    """
    Define a CV in a pre-defined list
    
    Parameters
    ----------
    cv : sklearn.model_selection.KFold
        cv to be put into the list
    num_ins : int
        number of folds

    Returns
    -------
    list
        defined cv
    """
    ret_vec = [0]*num_ins
    counter_f = 0
    for train,test in cv:
        for t in test:
            ret_vec[t] = counter_f
        counter_f += 1
    return(ret_vec)