





import doctest
import logging
import os
import unittest
from pathlib import Path
from typing import List, Union

import transformers
from transformers.testing_utils import require_tf, require_torch, slow


__lowerCamelCase :  Dict										=  logging.getLogger()



@unittest.skip('Temporarily disable the doc tests.'    )
@require_torch
@require_tf
@slow
class       A__     ( unittest.TestCase    ):





      def  __UpperCamelCase(				self ,							A_ ,							A_ = None ,							A_ = None ,							A_ = None ,							A_ = True ,							):
       '''simple docstring'''




       UpperCamelCase			:      Union[str, Any] 			=     [file for file in os.listdir(A_     ) if os.path.isfile(os.path.join(A_ ,							A_     )     )]

       if identifier is not None:
        UpperCamelCase			:      int 			=     [file for file in files if identifier in file]

       if n_identifier is not None:
        if isinstance(A_ ,							A_     ):
         for n_ in n_identifier:
          UpperCamelCase			:      Any 			=     [file for file in files if n_ not in file]
        else:
         UpperCamelCase			:      Optional[int] 			=     [file for file in files if n_identifier not in file]

       UpperCamelCase			:      Dict 			=     ignore_files or []
       ignore_files.append("__init__.py"     )
       UpperCamelCase			:      Tuple 			=     [file for file in files if file not in ignore_files]

       for file in files:
        # Open all files
        print("Testing" ,							A_     )

        if only_modules:
         UpperCamelCase			:      str 			=     file.split("."     )[0]
         try:
          UpperCamelCase			:      Union[str, Any] 			=     getattr(A_ ,							A_     )
          UpperCamelCase			:      int 			=     doctest.DocTestSuite(A_     )
          UpperCamelCase			:      Union[str, Any] 			=     unittest.TextTestRunner().run(A_     )
          self.assertIs(len(result.failures     ) ,							0     )
         except AttributeError:
          logger.info(F"""{module_identifier} is not a module."""     )
        else:
         UpperCamelCase			:      Tuple 			=     doctest.testfile(str(".." / directory / file     ) ,							optionflags=doctest.ELLIPSIS     )
         self.assertIs(result.failed ,							0     )





      def  __UpperCamelCase(				self     ):
       '''simple docstring'''




       UpperCamelCase			:      int 			=     Path("src/transformers"     )
       UpperCamelCase			:      Dict 			=     "modeling"
       UpperCamelCase			:      Union[str, Any] 			=     [
           "modeling_ctrl.py",
           "modeling_tf_ctrl.py",
       ]
       self.analyze_directory(A_ ,							identifier=A_ ,							ignore_files=A_     )





      def  __UpperCamelCase(				self     ):
       '''simple docstring'''




       UpperCamelCase			:      Tuple 			=     Path("src/transformers"     )
       UpperCamelCase			:      Tuple 			=     "tokenization"
       self.analyze_directory(A_ ,							identifier=A_     )





      def  __UpperCamelCase(				self     ):
       '''simple docstring'''




       UpperCamelCase			:      Optional[Any] 			=     Path("src/transformers"     )
       UpperCamelCase			:      Optional[int] 			=     "configuration"
       self.analyze_directory(A_ ,							identifier=A_     )





      def  __UpperCamelCase(				self     ):
       '''simple docstring'''




       UpperCamelCase			:      Optional[int] 			=     Path("src/transformers"     )
       UpperCamelCase			:      Union[str, Any] 			=     ["configuration", "modeling", "tokenization"]
       self.analyze_directory(A_ ,							n_identifier=A_     )





      def  __UpperCamelCase(				self     ):
       '''simple docstring'''




       UpperCamelCase			:      List[str] 			=     Path("docs/source"     )
       UpperCamelCase			:      Optional[Any] 			=     ["favicon.ico"]
       self.analyze_directory(A_ ,							ignore_files=A_ ,							only_modules=A_     )







from __future__ import annotations



def 	A_       (  _lowerCAmelCase  )		->				list[int]:
 UpperCamelCase			:      Optional[Any] 			=     [True] * limit
 UpperCamelCase			:      Optional[Any] 			=     False
 UpperCamelCase			:      List[str] 			=     False
 UpperCamelCase			:      Tuple 			=     True

 for i in range(3							,     int(limit**0.5 + 1  )							,     2  ):
  UpperCamelCase			:      Optional[Any] 			=     i * 2
  while index < limit:
   UpperCamelCase			:      int 			=     False
   UpperCamelCase			:      Optional[int] 			=     index + i

 UpperCamelCase			:      Any 			=     [2]

 for i in range(3							,     _lowerCAmelCase							,     2  ):
  if is_prime[i]:
   primes.append(_lowerCAmelCase  )

 return primes



def 	A_       (  _lowerCAmelCase = 100_0000  )		->				int:
 UpperCamelCase			:      Union[str, Any] 			=     prime_sieve(_lowerCAmelCase  )
 UpperCamelCase			:      List[str] 			=     0
 UpperCamelCase			:      Union[str, Any] 			=     0

 for i in range(len(_lowerCAmelCase  )  ):
  for j in range(i + length							,     len(_lowerCAmelCase  )  ):
   UpperCamelCase			:      Dict 			=     sum(primes[i:j]  )
   if sol >= ceiling:
    break

   if sol in primes:
    UpperCamelCase			:      int 			=     j - i
    UpperCamelCase			:      Dict 			=     sol

 return largest


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