def get_survival_function(cv_pipeline, X_test_df):
    """Get model-predicted survival function for test data."""
    return {
        'samples': X_test_df.index.values,
        'functions': cv_pipeline.best_estimator_.predict_survival_function(X_test_df)
    }