



"""simple docstring"""







from unittest import TestCase

from datasets import Dataset
from minhash_deduplication import deduplicate_dataset, make_duplicate_clusters

def     UpperCamelCase_   (   )						->       Optional[int]:

  """simple docstring"""




  lowerCAmelCase_       :    Tuple								=			{
      '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],
  }
  lowerCAmelCase_       :    Dict								=			Dataset.from_dict(lowerCAmelCase__						)
  return dataset







class 				UpperCamelCase__       (     lowercase_  ):




      """simple docstring"""




      def 					SCREAMING_SNAKE_CASE__			(				self    :				str	):
        lowerCAmelCase_       :    List[str]								=			get_dataset()
        lowerCAmelCase_       :    str								=			make_duplicate_clusters(SCREAMING_SNAKE_CASE_   ,      0.85	)
        self.assertEqual(len(duplicate_clusters[0]	)   ,      2	)





      def 					SCREAMING_SNAKE_CASE__			(				self    :				List[str]	):
        lowerCAmelCase_       :    str								=			get_dataset()
        lowerCAmelCase_						,lowerCAmelCase_       :    Union[str, Any]								=			deduplicate_dataset(SCREAMING_SNAKE_CASE_	)
        self.assertEqual(len(SCREAMING_SNAKE_CASE_	)   ,      2	)
        print(SCREAMING_SNAKE_CASE_	)
        self.assertEqual(duplicate_clusters[0][0]['copies']   ,      2	)
        self.assertEqual(duplicate_clusters[0][0]['is_extreme']   ,      SCREAMING_SNAKE_CASE_	)










"""simple docstring"""







from __future__ import annotations

def     UpperCamelCase_   (   lowerCAmelCase__				:    int						)						->       list[int]:

  """simple docstring"""




  lowerCAmelCase_       :    Any								=			2
  lowerCAmelCase_       :    List[Any]								=			[]
  while i * i <= n:
    if n % i:
      i += 1
    else:
      n //= i
      factors.append(lowerCAmelCase__						)
  if n > 1:
    factors.append(lowerCAmelCase__						)
  return factors


if __name__ == "__main__":
     import doctest

     doctest.testmod()





