code: def test_vectorization_series_to_hier_proba(method, mtype):
      """Test that forecaster vectorization works for Hierarchical data, predict_proba.
  
      This test passes Hierarchical data to the ARIMA forecaster which internally has an
      implementation for Series only, so the BaseForecaster has to vectorize.
      """
      hierarchy_levels = (2, 4)
      y = _make_hierarchical(
          hierarchy_levels=hierarchy_levels, random_state=84
      )
      y = convert(y, from_type="pd_multiindex_hier", to_type=mtype)
  
      est = ARIMA().fit(y)
      y_pred = getattr(est, method)([1, 2, 3])
  
      if method in ["predict_interval", "predict_quantiles"]:
          expected_mtype = method.replace("ict", "")
      elif method in ["predict_var"]:
          expected_mtype = "pd_multiindex_hier"
      else:
          RuntimeError(
              f"bug in test, unreachable state, method {method} queried"
          )
  
      valid, _, _ = check_is_mtype(
          y_pred,
          expected_mtype,
          return_metadata=True,
          msg_return_dict="list",
      )
  
      msg = (
          f"vectorization of forecaster method {method} does not work for test example "
          f"of mtype {mtype}, using the ARIMA forecaster"
      )
  
      assert valid, msg
  
imports: from functools import reduce
  from operator import mul
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_series_equal
  from sktime.datatypes import check_is_mtype, convert
  from sktime.datatypes._utilities import get_cutoff, get_window
  from sktime.forecasting.arima import ARIMA
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.theta import ThetaForecaster
  from sktime.forecasting.var import VAR
  from sktime.utils._testing.hierarchical import _make_hierarchical
  from sktime.utils._testing.panel import _make_panel
  from sktime.utils._testing.series import _make_series
  from sktime.utils.parallel import _get_parallel_test_fixtures
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 4 for calling a global function with example usage: test_vectorization_series_to_hier_proba(method, mtype) without return types