code: def test_aggregation_unweighted(forecasters, y, aggfunc):
      """Assert aggfunc returns the correct values."""
      forecaster = EnsembleForecaster(
          forecasters=forecasters, aggfunc=aggfunc
      )
      forecaster.fit(y, fh=[1, 2, 3])
      actual_pred = forecaster.predict()
  
      predictions = []
  
      _aggfunc = VALID_AGG_FUNCS[aggfunc]["unweighted"]
      for _, forecaster in forecasters:
          f = forecaster
          f.fit(y)
          f_pred = f.predict(fh=[1, 2, 3])
          predictions.append(f_pred)
  
      expected_pred = pd.DataFrame()
      for col in predictions[0].columns:
          column_preds = pd.concat(
              [p[col] for p in predictions], axis=1
          )
          expected_pred.loc[:, col] = pd.Series(
              _aggfunc(column_preds, axis=1),
              index=column_preds.index,
          )
  
      # expected_pred = predictions.apply(func=_aggfunc, axis=1, weights=weights)
      pd.testing.assert_frame_equal(actual_pred, expected_pred)
  
file_path: sktime/sktime/forecasting/compose/tests/test_ensemble.py
imports: import numpy
  import pandas
  import pytest
  from sktime.forecasting.compose import EnsembleForecaster
  from sktime.forecasting.compose._ensemble import VALID_AGG_FUNCS
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.trend import PolynomialTrendForecaster
  from sktime.utils._testing.forecasting import make_forecasting_problem
label_desc: Use image node_id 2 for calling a global function with example usage: test_aggregation_unweighted(forecasters, y, aggfunc) without return types