def collect_train_and_val_data(splits_per_class, split_index):
    """
    Collect validation and training data from split according to split_index

    Normally, we collect 1 split for training and the remaining for validation

    - splits_per_class - list containing the splits
    - split_index - index to get for training and remaining for validation
    """

    train_list = []
    full_val = []
    for item in range(len(splits_per_class)):
        val = []
        for list_items in range(len(splits_per_class[item])):
            if list_items == split_index:
                train_list.append(splits_per_class[item][list_items])
            else:
                val.extend(splits_per_class[item][list_items])

        full_val.append(val)

    return train_list, full_val