def METHOD_NAME():
    with mock.patch('sklearn.base.clone', lambda x: x):
        mock_model = mock.MagicMock()
        def mock_fit(*args, **kwargs):
            raise ValueError()
        mock_model.fit = mock_fit
        with pytest.warns(ModelFitWarning):
            scores = cross_val_score(
                mock_model, y, scoring='mean_squared_error',
                cv=SlidingWindowForecastCV(window_size=100, step=24, h=1),
                verbose=0)
        assert np.isnan(scores).all()
        # if the error_score is 'raise', we will raise
        with pytest.raises(ValueError):
            cross_val_score(
                mock_model, y, scoring='mean_squared_error',
                cv=SlidingWindowForecastCV(window_size=100, step=24, h=1),
                verbose=0, error_score='raise')