code: def test_predict_bootstrapping_ValueError_when_level_out_sample_residuals_value_contains_None_or_NaNs(
      transformer_series,
  ):
      """
      Test ValueError is raised when in_sample_residuals=False and
      forecaster.out_sample_residuals has a level with a None or NaN value.
      """
      forecaster = ForecasterAutoregMultiSeriesCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors,
          window_size=3,
          transformer_series=transformer_series,
      )
      forecaster.fit(series=series)
      residuals = {
          "1": np.array([1, 2, 3, 4, 5]),
          "2": np.array([1, 2, 3, 4, None]),
      }  # StandardScaler() transforms None to NaN
      forecaster.set_out_sample_residuals(residuals=residuals)
  
      err_msg = re.escape(
          (
              f"forecaster residuals for level '2' contains `None` "
              f"or `NaNs` values. Check `forecaster.out_sample_residuals`."
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster.predict_bootstrapping(
              steps=3, in_sample_residuals=False
          )
  
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.exceptions import NotFittedError
  from skforecast.ForecasterAutoregMultiSeriesCustom import ForecasterAutoregMultiSeriesCustom
  from sklearn.compose import ColumnTransformer
  from sklearn.preprocessing import StandardScaler
  from sklearn.preprocessing import OneHotEncoder
  from sklearn.linear_model import LinearRegression
  from .fixtures_ForecasterAutoregMultiSeriesCustom import series
  from .fixtures_ForecasterAutoregMultiSeriesCustom import exog
  from .fixtures_ForecasterAutoregMultiSeriesCustom import exog_predict
label_desc: Use image node_id 7 for calling a global function with example usage: test_predict_bootstrapping_ValueError_when_level_out_sample_residuals_value_contains_None_or_NaNs(transformer_series) without return types