code: def test_auto_ets():
      """Test failure case from #1435.
  
      https://github.com/sktime/sktime/issues/1435#issue-1000175469
      """
      freq = "30T"
      _y = (
          np.arange(50)
          + np.random.rand(50)
          + np.sin(np.arange(50) / 4) * 10
      )
      t = pd.date_range("2021-09-19", periods=50, freq=freq)
      y = pd.Series(_y, index=t)
      y.index = y.index.to_period(freq=freq)
      forecaster = AutoETS(sp=12, auto=True, n_jobs=-1)
      forecaster.fit(y)
      y_pred = forecaster.predict(fh=[1, 2, 3])
      pd.testing.assert_index_equal(
          y_pred.index,
          pd.date_range("2021-09-19", periods=53, freq=freq)[
              -3:
          ].to_period(freq=freq),
      )
  
imports: from datetime import timedelta
  import numpy
  import pandas
  import pytest
  from numpy.testing._private.utils import assert_array_equal
  from pytest import raises
  from sktime.datasets import load_airline
  from sktime.datatypes._utilities import get_cutoff
  from sktime.forecasting.arima import AutoARIMA
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.forecasting.base._fh import DELEGATED_METHODS, _check_freq, _extract_freq_from_cutoff
  from sktime.forecasting.ets import AutoETS
  from sktime.forecasting.exp_smoothing import ExponentialSmoothing
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.tests._config import INDEX_TYPE_LOOKUP, TEST_FHS, TEST_FHS_TIMEDELTA, VALID_INDEX_FH_COMBINATIONS
  from sktime.split import temporal_train_test_split
  from sktime.tests.test_switch import run_test_for_class
  from sktime.utils._testing.forecasting import _make_fh, make_forecasting_problem
  from sktime.utils._testing.series import _make_index, _make_series
  from sktime.utils.datetime import _coerce_duration_to_int, _get_duration, _get_freq, _get_intervals_count_and_unit, _shift, infer_freq
  from sktime.utils.validation.series import is_in_valid_index_types, is_integer_index
label_desc: Use image node_id 24 for calling a global function with example usage: test_auto_ets() without return types