





'''simple docstring'''






from unittest import TestCase

from datasets import Dataset
from minhash_deduplication import deduplicate_dataset, make_duplicate_clusters
def   UpperCamelCase__ (						):





      """simple docstring"""


      _lowerCAmelCase					=				{
          """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					=				Dataset.from_dict(lowerCAmelCase    )
      return dataset





class 					UpperCAmelCase	(     snake_case_  ):




      def 							lowercase__       (     self     :					List[str]    )							-> List[Any]:
            _lowerCAmelCase					=				get_dataset()
            _lowerCAmelCase					=				make_duplicate_clusters(__snake_case     ,     0.85    )
            self.assertEqual(len(duplicate_clusters[0]    )     ,     2    )




      def 							lowercase__       (     self     :					Optional[int]    )							-> Dict:
            _lowerCAmelCase					=				get_dataset()
            _lowerCAmelCase	,				_lowerCAmelCase					=				deduplicate_dataset(__snake_case    )
            self.assertEqual(len(__snake_case    )     ,     2    )
            print(__snake_case    )
            self.assertEqual(duplicate_clusters[0][0]["""copies"""]     ,     2    )
            self.assertEqual(duplicate_clusters[0][0]["""is_extreme"""]     ,     __snake_case    )













'''simple docstring'''






def   UpperCamelCase__ (						lowerCAmelCase    ):





      """simple docstring"""


      if divisor % 5 == 0 or divisor % 2 == 0:
            return 0
      _lowerCAmelCase					=				1
      _lowerCAmelCase					=				1
      while repunit:
            _lowerCAmelCase					=				(10 * repunit + 1) % divisor
            repunit_index += 1
      return repunit_index
def   UpperCamelCase__ (						lowerCAmelCase = 1_00_00_00    ):





      """simple docstring"""


      _lowerCAmelCase					=				limit - 1
      if divisor % 2 == 0:
            divisor += 1
      while least_divisible_repunit(lowerCAmelCase    ) <= limit:
            divisor += 2
      return divisor


if __name__ == "__main__":
      print(F"""{solution() = }""")






