code: def test_predict_bootstrapping_ValueError_when_not_in_sample_residuals_for_some_step():
      """
      Test ValueError is raised when in_sample_residuals=True but there is no
      residuals for some step.
      """
      forecaster = ForecasterAutoregMultiVariate(
          LinearRegression(), level="l1", lags=3, steps=2
      )
      forecaster.fit(series=series)
      forecaster.in_sample_residuals = {2: np.array([1, 2, 3])}
  
      err_msg = re.escape(
          (
              f"Not `forecaster.in_sample_residuals` for steps: "
              f"{set([1, 2]) - set(forecaster.in_sample_residuals.keys())}."
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster.predict_bootstrapping(
              steps=None, in_sample_residuals=True
          )
  
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.exceptions import NotFittedError
  from skforecast.ForecasterAutoregMultiVariate import ForecasterAutoregMultiVariate
  from sklearn.linear_model import LinearRegression
  from sklearn.compose import ColumnTransformer
  from sklearn.preprocessing import StandardScaler
  from sklearn.preprocessing import OneHotEncoder
  from .fixtures_ForecasterAutoregMultiVariate import series
  from .fixtures_ForecasterAutoregMultiVariate import exog
  from .fixtures_ForecasterAutoregMultiVariate import exog_predict
label_desc: Use image node_id 2 for calling a global function with example usage: test_predict_bootstrapping_ValueError_when_not_in_sample_residuals_for_some_step() without return types