code: def test_frame_mi_access_returns_series(
      dataframe_with_duplicate_index,
  ):
      # GH 4146, not returning a block manager when selecting a unique index
      # from a duplicate index
      # as of 4879, this returns a Series (which is similar to what happens
      # with a non-unique)
      df = dataframe_with_duplicate_index
      expected = Series(
          ["a", 1, 1], index=["h1", "h3", "h5"], name="A1"
      )
      result = df["A"]["A1"]
      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 17 for calling a global function with example usage: test_frame_mi_access_returns_series(dataframe_with_duplicate_index) without return types