code: def test_predict_residuals():
      """Test that predict_residuals has no side-effect."""
      from sktime.forecasting.base import ForecastingHorizon
      from sktime.split import temporal_train_test_split
  
      y = _make_series(n_columns=1)
      y_train, y_test = temporal_train_test_split(y)
      fh = ForecastingHorizon(y_test.index, is_relative=False)
      forecaster = ThetaForecaster(sp=12)
      forecaster.fit(y_train, fh=fh)
  
      y_pred_1 = forecaster.predict()
      y_resid = forecaster.predict_residuals()
      y_pred_2 = forecaster.predict()
      assert_series_equal(y_pred_1, y_pred_2)
      assert y_resid.index.equals(y_train.index)
  
imports: from functools import reduce
  from operator import mul
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_series_equal
  from sktime.datatypes import check_is_mtype, convert
  from sktime.datatypes._utilities import get_cutoff, get_window
  from sktime.forecasting.arima import ARIMA
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.theta import ThetaForecaster
  from sktime.forecasting.var import VAR
  from sktime.utils._testing.hierarchical import _make_hierarchical
  from sktime.utils._testing.panel import _make_panel
  from sktime.utils._testing.series import _make_series
  from sktime.utils.parallel import _get_parallel_test_fixtures
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 10 for calling a global function with example usage: test_predict_residuals() without return types