def get_train_val_split_from_idx(src, val_list):
    """
    Get indices split for train and validation subsets

    src -- dataset size (int) or full range of indices (list)
    val_list -- indices that belong to the validation subset
    
    """
    train_idx = []
    val_idx = val_list

    if not hasattr(src, '__iter__'):
        src = range(src)

    for x in src:

        if x not in val_idx:
            train_idx.append(x)

    return train_idx, val_idx