def render_cv_scheme(cv, y_train: pd.DataFrame) -> str:
    """Render the CV scheme used for training and log it to W&B."""

    random_time_series = (
        y_train.groupby(level=[0, 1])
        .get_group((1, 111))
        .reset_index(level=[0, 1], drop=True)
    )
    plot_windows(cv, random_time_series)

    save_path = str(OUTPUT_DIR / "cv_scheme.png")
    plt.savefig(save_path)
    wandb.log({"cv_scheme": wandb.Image(save_path)})

    return save_path
Render the CV scheme used for training and log it to W&B.
training-pipeline/training_pipeline/hyperparameter_tuning.py