code: def test_loc_getitem_frame(self):
      # CategoricalIndex with IntervalIndex categories
      df = DataFrame({"A": range(10)})
      ser = pd.cut(df.A, 5)
      df["B"] = ser
      df = df.set_index("B")
  
      result = df.loc[4]
      expected = df.iloc[4:6]
      tm.assert_frame_equal(result, expected)
  
      with pytest.raises(KeyError, match="10"):
          df.loc[10]
  
      # single list-like
      result = df.loc[[4]]
      expected = df.iloc[4:6]
      tm.assert_frame_equal(result, expected)
  
      # non-unique
      result = df.loc[[4, 5]]
      expected = df.take([4, 5, 4, 5])
      tm.assert_frame_equal(result, expected)
  
      msg = (
          r"None of \[Index\(\[10\], dtype='object', name='B'\)\] "
          r"are in the \[index\]"
      )
      with pytest.raises(KeyError, match=msg):
          df.loc[[10]]
  
      # partial missing
      with pytest.raises(KeyError, match=r"\[10\] not in index"):
          df.loc[[10, 4]]
  
file_path: pandas/pandas/tests/indexing/interval/test_interval.py
imports: import numpy
  import pytest
  from pandas._libs import index
  from pandas.compat import IS64
  import pandas
  from pandas import DataFrame, IntervalIndex, Series
  import pandas._testing
label_desc: Use image node_id 6 for calling the TestIntervalIndex obj's underlying member method code with example usage: obj.test_loc_getitem_frame() without return types