code: def test_get_time_index(scitype, mtype):
      """Tests that get_time_index returns the expected output.
  
      Note: this is tested only for fixtures with equal time index across instances,
      as get_time_index assumes that.
  
      Parameters
      ----------
      scitype : str - scitype of input
      mtype : str - mtype of input
  
      Raises
      ------
      AssertionError if get_time_index does not return the expected return
          for any fixture example of given scitype, mtype
      """
      # get_time_index currently does not work for df-list type, skip
      if mtype == "df-list":
          return None
  
      # retrieve example fixture
      fixtures = get_examples(
          mtype=mtype, as_scitype=scitype, return_metadata=True
      )
  
      for fixture_tuple in fixtures.values():
          fixture = fixture_tuple[0]
          fixture_metadata = fixture_tuple[2]
  
          if fixture is None:
              continue
          if not fixture_metadata.get("is_equal_index", True):
              continue
  
          idx = get_time_index(fixture)
  
          msg = f"get_time_index should return pd.Index, but found {type(idx)}"
          assert isinstance(idx, pd.Index), msg
  
          if mtype in ["pd.Series", "pd.DataFrame"]:
              assert (idx == fixture.index).all()
  
          if mtype in ["np.ndarray", "numpy3D"]:
              assert isinstance(idx, pd.RangeIndex)
              if mtype == "np.ndarray":
                  assert len(idx) == fixture.shape[0]
              else:
                  assert len(idx) == fixture.shape[-1]
  
          if mtype in ["pd-multiindex", "pd_multiindex_hier"]:
              exp_idx = fixture.index.get_level_values(-1).unique()
              assert (idx == exp_idx).all()
  
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 1 for calling a global function with example usage: test_get_time_index(scitype, mtype) and returns: None