code: def test_strategy_last_seasonal(fh, sp):
      """Test last strategy on seasonal data."""
      f = NaiveForecaster(strategy="last", sp=sp)
      f.fit(y_train)
      y_pred = f.predict(fh)
  
      # check predicted index
      cutoff = get_cutoff(y_train, return_index=True)
      _assert_correct_pred_time_index(y_pred.index, cutoff, fh)
  
      # check values
      fh = check_fh(fh)  # get well formatted fh
      reps = int(np.ceil(max(fh) / sp))
      expected = np.tile(y_train.iloc[-sp:], reps=reps)[fh - 1]
      np.testing.assert_array_equal(y_pred, expected)
  
imports: import numpy
  import pandas
  import pytest
  from sktime.datatypes._utilities import get_cutoff
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.tests._config import TEST_OOS_FHS, TEST_SPS, TEST_WINDOW_LENGTHS_INT
  from sktime.utils._testing.forecasting import _assert_correct_pred_time_index
  from sktime.utils.validation.forecasting import check_fh
label_desc: Use image node_id 3 for calling a global function with example usage: test_strategy_last_seasonal(fh, sp) without return types