code: def test_sort_index_multiindex(self, level):
      # GH#13496
  
      # sort rows by specified level of multi-index
      mi = MultiIndex.from_tuples(
          [[2, 1, 3], [2, 1, 2], [1, 1, 1]], names=list("ABC")
      )
      df = DataFrame([[1, 2], [3, 4], [5, 6]], index=mi)
  
      expected_mi = MultiIndex.from_tuples(
          [[1, 1, 1], [2, 1, 2], [2, 1, 3]], names=list("ABC")
      )
      expected = DataFrame([[5, 6], [3, 4], [1, 2]], index=expected_mi)
      result = df.sort_index(level=level)
      tm.assert_frame_equal(result, expected)
  
      # sort_remaining=False
      expected_mi = MultiIndex.from_tuples(
          [[1, 1, 1], [2, 1, 3], [2, 1, 2]], names=list("ABC")
      )
      expected = DataFrame([[5, 6], [1, 2], [3, 4]], index=expected_mi)
      result = df.sort_index(level=level, sort_remaining=False)
      tm.assert_frame_equal(result, expected)
  
imports: import numpy
  import pytest
  import pandas
  from pandas import CategoricalDtype, CategoricalIndex, DataFrame, IntervalIndex, MultiIndex, RangeIndex, Series, Timestamp
  import pandas._testing
label_desc: Use image node_id 12 for calling the TestDataFrameSortIndex obj's underlying member method code with example usage: obj.test_sort_index_multiindex(level) without return types