code: def test_lexsort_depth(self):
      # Test that lexsort_depth return the correct sortorder
      # when it was given to the MultiIndex const.
      # GH#28518
  
      levels = [[0, 1], [0, 1, 2]]
  
      index = MultiIndex(
          levels=levels,
          codes=[[0, 0, 0, 1, 1, 1], [0, 1, 2, 0, 1, 2]],
          sortorder=2,
      )
      assert index._lexsort_depth == 2
  
      index = MultiIndex(
          levels=levels,
          codes=[[0, 0, 0, 1, 1, 1], [0, 1, 2, 0, 2, 1]],
          sortorder=1,
      )
      assert index._lexsort_depth == 1
  
      index = MultiIndex(
          levels=levels,
          codes=[[0, 0, 1, 0, 1, 1], [0, 1, 0, 2, 2, 1]],
          sortorder=0,
      )
      assert index._lexsort_depth == 0
  
imports: from pandas import MultiIndex
label_desc: Use image node_id 1 for calling the TestLexsortDepth obj's underlying member method code with example usage: obj.test_lexsort_depth() without return types