code: def test_flatten_multiindex():
      """Test flatten_multiindex contract."""
      mi = pd.MultiIndex.from_product([["a", "b"], [0, 42]])
  
      flat = flatten_multiindex(mi)
  
      expected = pd.Index(["a__0", "a__42", "b__0", "b__42"])
  
      assert isinstance(flat, pd.Index)
      assert (expected == flat).all()
  
imports: import pandas
  import pytest
  from sktime.utils.multiindex import flatten_multiindex, rename_multiindex
label_desc: Use image node_id 1 for calling a global function with example usage: test_flatten_multiindex() without return types