code: def test_scitype_infer(scitype, mtype, fixture_index):
      """Tests that scitype correctly infers the mtype of examples.
  
      Parameters
      ----------
      scitype : str - scitype of fixture
      mtype : str - mtype of fixture
      fixture_index : int - index of fixture tuple with that scitype and mtype
  
      Raises
      ------
      RuntimeError if scitype is not defined or has no mtypes or examples
      AssertionError if mtype of examples is not correctly identified
      error if check itself raises an error
      """
      # if mtypes are ambiguous, then this test should be skipped
      if scitype in SKIP_SCITYPES or mtype in AMBIGUOUS_MTYPES:
          return None
  
      # retrieve fixture for checking
      fixture = get_examples(mtype=mtype, as_scitype=scitype).get(
          fixture_index
      )
  
      # todo: possibly remove this once all checks are defined
      check_is_defined = (mtype, scitype) in check_dict.keys()
  
      # check fixtures that exist against checks that exist
      if fixture is not None and check_is_defined:
          assert scitype == infer_scitype(
              fixture, candidate_scitypes=SCITYPES_FOR_INFER_TEST
          ), f"scitype {scitype} not correctly identified for fixture {fixture_index}"
  
file_path: sktime/sktime/datatypes/tests/test_check.py
imports: import numpy
  from sktime.datatypes._check import AMBIGUOUS_MTYPES, check_dict, check_is_mtype, check_is_scitype
  from sktime.datatypes._check import mtype
  from sktime.datatypes._check import scitype
  from sktime.datatypes._examples import get_examples
  from sktime.datatypes._registry import SCITYPE_LIST, scitype_to_mtype
label_desc: Use image node_id 9 for calling a global function with example usage: test_scitype_infer(scitype, mtype, fixture_index) and returns: None