code: def test_duplicate_meta_data():
      # GH 10115
      mi = MultiIndex(
          levels=[[0, 1], [0, 1, 2]],
          codes=[[0, 0, 0, 0, 1, 1, 1], [0, 1, 2, 0, 0, 1, 2]],
      )
  
      for idx in [
          mi,
          mi.set_names([None, None]),
          mi.set_names([None, "Num"]),
          mi.set_names(["Upper", "Num"]),
      ]:
          assert idx.has_duplicates
          assert idx.drop_duplicates().names == idx.names
  
imports: from itertools import product
  import numpy
  import pytest
  from pandas._libs import hashtable, index
  from pandas import NA, DatetimeIndex, Index, MultiIndex, Series
  import pandas._testing
label_desc: Use image node_id 7 for calling a global function with example usage: test_duplicate_meta_data() without return types