for outer_train, outer_test in outer_cv:
    print('Outer set. Train:', set(strata[outer_train]), '\tTest:', set(strata
        [outer_test]))
inner_cv = LabelKFold(labels=strata[outer_train], n_folds=3)
print('\tInner:')
for inner_train, inner_test in inner_cv:
    print('\t\tTrain:', set(strata[outer_train][inner_train]), '\tTest:', set(
        strata[outer_train][inner_test]))
clf = GridSearchCV(estimator=toy_rf, param_grid=tuned_par, scoring=
    roc_auc_scorer, cv=inner_cv, n_jobs=1)
clf.fit(X[outer_train], Z[outer_train])
scores.append(clf.score(X[outer_test], Z[outer_test]))
How to nest LabelKFold?