def plot_confusion_matrix_with_cv(clf, X, y, labels=None, true_labels=None,
                                  pred_labels=None, title=None,
                                  normalize=False, hide_zeros=False,
                                  x_tick_rotation=0, do_cv=True, cv=None,
                                  shuffle=True, random_state=None, ax=None,
                                  figsize=None, cmap='Blues',
                                  title_fontsize="large",
                                  text_fontsize="medium"):
    y = np.array(y)
    if not do_cv:
        y_pred = clf.predict(X)
        y_true = y
    else:
        if cv is None:
            cv = StratifiedKFold(shuffle=shuffle, random_state=random_state)
        elif isinstance(cv, int):
            cv = StratifiedKFold(n_splits=cv, shuffle=shuffle,
                                 random_state=random_state)
        else:
            pass
        clf_clone = clone(clf)
        preds_list = []
        trues_list = []
        for train_index, test_index in cv.split(X, y):
            X_train, X_test = X[train_index], X[test_index]
            y_train, y_test = y[train_index], y[test_index]
            clf_clone.fit(X_train, y_train)
            preds = clf_clone.predict(X_test)
            preds_list.append(preds)
            trues_list.append(y_test)
        y_pred = np.concatenate(preds_list)
        y_true = np.concatenate(trues_list)
    ax = plotters.plot_confusion_matrix(y_true=y_true, y_pred=y_pred,
                                        labels=labels, true_labels=true_labels,
                                        pred_labels=pred_labels,
                                        title=title, normalize=normalize,
                                        hide_zeros=hide_zeros,
                                        x_tick_rotation=x_tick_rotation, ax=ax,
                                        figsize=figsize, cmap=cmap,
                                        title_fontsize=title_fontsize,
                                        text_fontsize=text_fontsize)
    return ax