code: def test_getitem_intkey_leading_level(
      self, multiindex_year_month_day_dataframe_random_data, dtype
  ):
      # GH#33355 dont fall-back to positional when leading level is int
      ymd = multiindex_year_month_day_dataframe_random_data
      levels = ymd.index.levels
      ymd.index = ymd.index.set_levels(
          [levels[0].astype(dtype)] + levels[1:]
      )
      ser = ymd["A"]
      mi = ser.index
      assert isinstance(mi, MultiIndex)
      if dtype is int:
          assert mi.levels[0].dtype == np.dtype(int)
      else:
          assert mi.levels[0].dtype == np.float64
  
      assert 14 not in mi.levels[0]
      assert not mi.levels[0]._should_fallback_to_positional
      assert not mi._should_fallback_to_positional
  
      with pytest.raises(KeyError, match="14"):
          ser[14]
  
file_path: pandas/pandas/tests/indexing/multiindex/test_partial.py
imports: import numpy
  import pytest
  from pandas import DataFrame, DatetimeIndex, MultiIndex, date_range
  import pandas._testing
label_desc: Use image node_id 8 for calling the TestMultiIndexPartial obj's underlying member method code with example usage: obj.test_getitem_intkey_leading_level(multiindex_year_month_day_dataframe_random_data, dtype) without return types