code: def test_get_slice_output_type(scitype, mtype):
      """Tests that get_slice runs for all mtypes, and returns output of same mtype.
  
      Parameters
      ----------
      scitype : str - scitype of input
      mtype : str - mtype of input
  
      Raises
      ------
      Exception if get_slice raises one
      """
      # retrieve example fixture
      fixture = get_examples(
          mtype=mtype, as_scitype=scitype, return_lossy=False
      )[0]
      X = get_slice(fixture)
      valid, err, _ = check_is_mtype(
          X, mtype=mtype, return_metadata=True, msg_return_dict="list"
      )
  
      msg = (
          f"get_slice should return an output of mtype {mtype} for that type of input, "
          f"but it returns an output not conformant with that mtype."
          f"Error from mtype check: {err}"
      )
  
      assert valid, msg
  
file_path: sktime/sktime/datatypes/tests/test_utils.py
imports: import numpy
  import pandas
  import pytest
  from sktime.datatypes._check import check_is_mtype
  from sktime.datatypes._examples import get_examples
  from sktime.datatypes._utilities import _get_cutoff_from_index, get_cutoff, get_slice, get_time_index, get_window
  from sktime.utils._testing.hierarchical import _make_hierarchical
label_desc: Use image node_id 8 for calling a global function with example usage: test_get_slice_output_type(scitype, mtype) without return types