code: def test_drop_duplicates(self):
      pidx = pd.Index([4, 2, 4, 1, 4, 3])
      psidx = ps.from_pandas(pidx)
  
      self.assert_eq(psidx.drop_duplicates(), pidx.drop_duplicates())
      self.assert_eq(
          (psidx + 1).drop_duplicates(), (pidx + 1).drop_duplicates()
      )
  
      self.assert_eq(
          psidx.drop_duplicates(keep="first"),
          pidx.drop_duplicates(keep="first"),
      )
      self.assert_eq(
          psidx.drop_duplicates(keep="last"),
          pidx.drop_duplicates(keep="last"),
      )
      self.assert_eq(
          psidx.drop_duplicates(keep=False),
          pidx.drop_duplicates(keep=False),
      )
  
      arrays = [
          [1, 2, 3, 1, 2],
          ["red", "blue", "black", "red", "blue"],
      ]
      pmidx = pd.MultiIndex.from_arrays(
          arrays, names=("number", "color")
      )
      psmidx = ps.from_pandas(pmidx)
      self.assert_eq(psmidx.drop_duplicates(), pmidx.drop_duplicates())
      self.assert_eq(
          psmidx.drop_duplicates(keep="first"),
          pmidx.drop_duplicates(keep="first"),
      )
      self.assert_eq(
          psmidx.drop_duplicates(keep="last"),
          pmidx.drop_duplicates(keep="last"),
      )
      self.assert_eq(
          psmidx.drop_duplicates(keep=False),
          pmidx.drop_duplicates(keep=False),
      )
  
file_path: spark/python/pyspark/pandas/tests/indexes/test_drop.py
imports: import unittest
  import numpy
  import pandas
  import pyspark.pandas
  from pyspark.testing.pandasutils import ComparisonTestBase, TestUtils
label_desc: Use image node_id 1 for calling the IndexesDropMixin obj's underlying member method code with example usage: obj.test_drop_duplicates() without return types