code: def test_strategy_last(fh):
      """Test last strategy."""
      f = NaiveForecaster(strategy="last")
      f.fit(y_train)
      y_pred = f.predict(fh)
      expected = np.repeat(y_train.iloc[-1], len(f.fh))
      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 1 for calling a global function with example usage: test_strategy_last(fh) without return types