code: def test_wrapper_series_mtype(wrapper, override_y_mtype, mtype):
      """Test that interval wrappers behave nicely with different internal y_mtypes.
  
      The wrappers require y to be pd.Series, and the internal estimator can have
      a different internal mtype.
  
      We test all interval wrappers in sktime (wrapper).
  
      We test once with an internal forecaster that needs pd.DataFrame conversion,
      and one that accepts pd.Series.
      We do this with a trick: the vanilla NaiveForecaster can accept both; we mimic a
      "pd.DataFrame only" forecaster by restricting its y_inner_mtype tag to pd.Series.
      """
      y = load_airline()
      y = convert_to(y, to_type=mtype)
  
      f = NaiveForecaster()
  
      if override_y_mtype:
          f.set_tags(**{"y_inner_mtype": "pd.DataFrame"})
  
      interval_forecaster = wrapper(f)
      interval_forecaster.fit(y, fh=[1, 2, 3])
      pred_int = interval_forecaster.predict_interval()
  
      assert isinstance(pred_int, pd.DataFrame)
      assert len(pred_int) == 3
  
      pred_var = interval_forecaster.predict_var()
  
      assert isinstance(pred_var, pd.DataFrame)
      assert len(pred_var) == 3
  
file_path: sktime/sktime/forecasting/tests/test_interval_wrappers.py
imports: import numpy
  import pandas
  import pytest
  from sktime.datasets import load_airline
  from sktime.datatypes import convert_to, scitype_to_mtype
  from sktime.forecasting.conformal import ConformalIntervals
  from sktime.forecasting.model_evaluation import evaluate
  from sktime.forecasting.naive import NaiveForecaster, NaiveVariance
  from sktime.performance_metrics.forecasting.probabilistic import PinballLoss
  from sktime.split import ExpandingWindowSplitter, SlidingWindowSplitter
  from sktime.tests.test_switch import run_test_for_class
label_desc: Use image node_id 1 for calling a global function with example usage: test_wrapper_series_mtype(wrapper, override_y_mtype, mtype) without return types