code: def test_sort_index_level_large_cardinality(self):
      # GH#2684 (int64)
      index = MultiIndex.from_arrays([np.arange(4000)] * 3)
      df = DataFrame(
          np.random.default_rng(2)
          .standard_normal(4000)
          .astype("int64"),
          index=index,
      )
  
      # it works!
      result = df.sort_index(level=0)
      assert result.index._lexsort_depth == 3
  
      # GH#2684 (int32)
      index = MultiIndex.from_arrays([np.arange(4000)] * 3)
      df = DataFrame(
          np.random.default_rng(2)
          .standard_normal(4000)
          .astype("int32"),
          index=index,
      )
  
      # it works!
      result = df.sort_index(level=0)
      assert (result.dtypes.values == df.dtypes.values).all()
      assert result.index._lexsort_depth == 3
  
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 20 for calling the TestDataFrameSortIndex obj's underlying member method code with example usage: obj.test_sort_index_level_large_cardinality() without return types