code: def test_vectorize_est(
      scitype,
      mtype,
      fixture_index,
      iterate_as,
      iterate_cols,
      varname_used,
      backend,
  ):
      """Tests vectorize_est method of VectorizeDF, for method = clone, fit.
  
      Fixtures parameterized
      ----------------------
      scitype : str - scitype of fixture
      mtype : str - mtype of fixture
      fixture_index : int - index of fixture tuple with that scitype and mtype
      iterate_as : str - level on which to iterate over
      iterate_cols : bool - whether to iterate over columns
  
      Raises
      ------
      RuntimeError if scitype is not defined or has no mtypes or examples
      AssertionError if vectorize_fit output has unexpected format
      exception if vectorize_fit produces error
      """
      from sktime.forecasting.naive import NaiveForecaster
  
      # escape for the invalid combinations, see above
      if not _is_valid_iterate_as(scitype, iterate_as):
          return None
  
      # retrieve fixture for checking
      fixture = get_examples(mtype=mtype, as_scitype=scitype).get(
          fixture_index
      )
      X_vect = VectorizedDF(
          X=fixture,
          iterate_as=iterate_as,
          is_scitype=None,
          iterate_cols=iterate_cols,
      )
  
      kwargs = {"fh": [1, 2], "X": X_vect}
  
      if varname_used:
          kwargs["varname_of_self"] = "y"
      else:
          kwargs["y"] = X_vect
  
      kwargs.update(backend)
  
      est_clones = X_vect.vectorize_est(
          NaiveForecaster(), method="clone"
      )
      result = X_vect.vectorize_est(est_clones, method="fit", **kwargs)
  
      def _len(x):
          if x is None:
              return 1
          else:
              return len(x)
  
      # the result should be a pd.DataFrame
      # with entries being fitted NaiveForecaster clones
      rows, cols = X_vect.get_iter_indices()
      n_rows = _len(rows)
      n_cols = _len(cols)
      assert isinstance(result, pd.DataFrame)
      assert result.shape == (n_rows, n_cols)
      is_fcst_frame = df_map(result)(
          lambda x: isinstance(x, NaiveForecaster)
      )
      assert is_fcst_frame.all().all()
  
imports: import numpy
  import pandas
  import pytest
  from sktime.datatypes import MTYPE_REGISTER, SCITYPE_REGISTER
  from sktime.datatypes._check import AMBIGUOUS_MTYPES, check_is_mtype
  from sktime.datatypes._examples import get_examples
  from sktime.datatypes._vectorize import VectorizedDF, _enforce_index_freq
  from sktime.utils._testing.deep_equals import deep_equals
  from sktime.utils.pandas import df_map
  from sktime.utils.parallel import _get_parallel_test_fixtures
label_desc: Use image node_id 13 for calling a global function with example usage: test_vectorize_est(scitype, mtype, fixture_index, iterate_as, iterate_cols, varname_used, backend) and returns: None, int, len