code: def test_series_getitem_multiindex(
      access_method, level1_value, expected
  ):
      # GH 6018
      # series regression getitem with a multi-index
  
      mi = MultiIndex.from_tuples(
          [(0, 0), (1, 1), (2, 1)], names=["A", "B"]
      )
      ser = Series([1, 2, 3], index=mi)
      expected.index.name = "A"
  
      result = access_method(ser, level1_value)
      tm.assert_series_equal(result, expected)
  
imports: import numpy
  import pytest
  from pandas import DataFrame, Index, MultiIndex, Series
  import pandas._testing
  from pandas.core.indexing import IndexingError
label_desc: Use image node_id 1 for calling a global function with example usage: test_series_getitem_multiindex(access_method, level1_value, expected) without return types