

"""simple docstring"""





from typing import Any




def   _A  (  UpperCamelCase_					:	list)     ->						list[Any]:
   '''simple docstring'''


   if not input_list:
      return []
   __lowercase								=						[input_list.count(UpperCamelCase_) for value in input_list]
   __lowercase								=						max(UpperCamelCase_)  # Gets the maximum count in the input list.
   # Gets values of modes
   return sorted({input_list[i] for i, value in enumerate(UpperCamelCase_) if value == y})


if __name__ == "__main__":
   import doctest

   doctest.testmod()







"""simple docstring"""





from unittest import TestCase

from datasets import Dataset
from minhash_deduplication import deduplicate_dataset, make_duplicate_clusters




def   _A  (  )     ->						Dict:
   '''simple docstring'''


   __lowercase								=						{
       "repo_name": ["test_repo1", "test_repo2", "test_repo3"],
       "path": ["test_1.py", "test_2.py", "unit_test.py"],
       "content": ["a " * 20, "a " * 30, "b " * 7],
   }
   __lowercase								=						Dataset.from_dict(UpperCamelCase_)
   return dataset




class  _lowerCAmelCase  (     lowercase       ):







 """simple docstring"""







 def  _lowercase			(      self							:      int     ):
    __lowercase								=						get_dataset()
    __lowercase								=						make_duplicate_clusters(UpperCAmelCase__, 0.85     )
    self.assertEqual(len(duplicate_clusters[0]     ), 2     )



 def  _lowercase			(      self							:      Any     ):
    __lowercase								=						get_dataset()
    __lowercase		,__lowercase								=						deduplicate_dataset(UpperCAmelCase__     )
    self.assertEqual(len(UpperCAmelCase__     ), 2     )
    print(UpperCAmelCase__     )
    self.assertEqual(duplicate_clusters[0][0]["copies"], 2     )
    self.assertEqual(duplicate_clusters[0][0]["is_extreme"], UpperCAmelCase__     )




