

"""simple docstring"""




from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream






class 	UpperCAmelCase__		(	_a	):






  """simple docstring"""


  def __init__(							self						:		Union[str, Any]     ,       __lowerCamelCase						:		Callable     ,       __lowerCamelCase						:		Optional[Features] = None     ,       __lowerCamelCase						:		str = None     ,       __lowerCamelCase						:		bool = False     ,       __lowerCamelCase						:		bool = False     ,       __lowerCamelCase						:		Optional[dict] = None     ,       __lowerCamelCase						:		Optional[int] = None     ,       **__lowerCamelCase						:		str     ,       )		->							Dict:
       super().__init__(
           features=__lowerCamelCase     ,       cache_dir=__lowerCamelCase     ,       keep_in_memory=__lowerCamelCase     ,       streaming=__lowerCamelCase     ,       num_proc=__lowerCamelCase     ,       **__lowerCamelCase     ,       )
       SCREAMING_SNAKE_CASE__   =   Generator(
           cache_dir=__lowerCamelCase     ,       features=__lowerCamelCase     ,       generator=__lowerCamelCase     ,       gen_kwargs=__lowerCamelCase     ,       **__lowerCamelCase     ,       )







  def 				lowercase_		(							self						:		List[str] )		->							int:
       # Build iterable dataset
       if self.streaming:
            SCREAMING_SNAKE_CASE__   =   self.builder.as_streaming_dataset(split='''train''' )
       # Build regular (map-style) dataset
       else:
            SCREAMING_SNAKE_CASE__   =   None
            SCREAMING_SNAKE_CASE__   =   None
            SCREAMING_SNAKE_CASE__   =   None
            SCREAMING_SNAKE_CASE__   =   None

            self.builder.download_and_prepare(
                download_config=__lowerCamelCase     ,       download_mode=__lowerCamelCase     ,       verification_mode=__lowerCamelCase     ,       base_path=__lowerCamelCase     ,       num_proc=self.num_proc     ,       )
            SCREAMING_SNAKE_CASE__   =   self.builder.as_dataset(
                split='''train'''     ,       verification_mode=__lowerCamelCase     ,       in_memory=self.keep_in_memory )
       return dataset





def     UpperCAmelCase_       (						_A    ):





     '''simple docstring'''




     if divisor % 5 == 0 or divisor % 2 == 0:
          return 0
     SCREAMING_SNAKE_CASE__   =   1
     SCREAMING_SNAKE_CASE__   =   1
     while repunit:
          SCREAMING_SNAKE_CASE__   =   (10 * repunit + 1) % divisor
          repunit_index += 1
     return repunit_index
def     UpperCAmelCase_       (						_A = 1_00_00_00    ):





     '''simple docstring'''




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


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


