code: def unique_index(df):
      
      try:
          assert df.index.is_unique
      except AssertionError as e:
          e.args = df.index.get_duplicates()
          raise
      return df
docs: Assert that the index is unique
  
      Parameters
      ==========
      df : DataFrame
  
      Returns
      =======
      df : DataFrame