code: def test_sort_unnecessary_warning():
      # GH#55386
      midx = MultiIndex.from_tuples([(1.5, 2), (3.5, 3), (0, 1)])
      midx = midx.set_levels([2.5, np.nan, 1], level=0)
      result = midx.sort_values()
      expected = MultiIndex.from_tuples([(1, 3), (2.5, 1), (np.nan, 2)])
      tm.assert_index_equal(result, expected)
  
imports: import numpy
  import pytest
  from pandas.errors import PerformanceWarning, UnsortedIndexError
  from pandas import CategoricalIndex, DataFrame, Index, MultiIndex, RangeIndex, Series, Timestamp
  import pandas._testing
  from pandas.core.indexes.frozen import FrozenList
label_desc: Use image node_id 17 for calling a global function with example usage: test_sort_unnecessary_warning() without return types