'''simple docstring'''




from typing import Callable, Optional

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





class     __magic_name__						(    _UpperCAmelCase):







			def __init__(	self				:  Optional[int]				,			lowercase_				:  Callable				,			lowercase_				:  Optional[Features] = None				,			lowercase_				:  str = None				,			lowercase_				:  bool = False				,			lowercase_				:  bool = False				,			lowercase_				:  Optional[dict] = None				,			lowercase_				:  Optional[int] = None				,			**lowercase_				:  Dict				,			):
										super().__init__(
										    features=lowercase_				,			cache_dir=lowercase_				,			keep_in_memory=lowercase_				,			streaming=lowercase_				,			num_proc=lowercase_				,			**lowercase_				,			)
										lowercase_					:			List[str]										=       Generator(
										    cache_dir=lowercase_				,			features=lowercase_				,			generator=lowercase_				,			gen_kwargs=lowercase_				,			**lowercase_				,			)







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

																	self.builder.download_and_prepare(
																	    download_config=lowercase_				,			download_mode=lowercase_				,			verification_mode=lowercase_				,			base_path=lowercase_				,			num_proc=self.num_proc				,			)
																	lowercase_					:			Any										=       self.builder.as_dataset(
																	    split="""train"""				,			verification_mode=lowercase_				,			in_memory=self.keep_in_memory    )
										return dataset






'''simple docstring'''




import math




def 							lowerCamelCase	(      UpperCAmelCase__       :					int )			->      int:

							if not isinstance(UpperCAmelCase__      ,      UpperCAmelCase__ ):
														lowercase_					:			List[Any]										=       F'''Input value of [number={number}] must be an integer'''
														raise TypeError(UpperCAmelCase__ )

							if number < 1:
														lowercase_					:			Tuple										=       F'''Input value of [number={number}] must be > 0'''
														raise ValueError(UpperCAmelCase__ )
							elif number == 1:
														return 3
							elif number == 2:
														return 5
							else:
														lowercase_					:			Union[str, Any]										=       int(math.log(number // 3      ,      2 ) ) + 2

														lowercase_					:			Any										=       [3, 5]
														lowercase_					:			List[Any]										=       2
														lowercase_					:			Optional[Any]										=       3
														for block in range(1      ,      UpperCAmelCase__ ):
																					for _ in range(UpperCAmelCase__ ):
																												proth_list.append(2 ** (block + 1) + proth_list[proth_index - 1] )
																												proth_index += 1
																					increment *= 2

							return proth_list[number - 1]


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						for number in range(11):
												_lowercase						: Optional[Any]						=						0
												try:
																		_lowercase						: str						=						proth(number)
												except ValueError:
																		print(f"""ValueError: there is no {number}th Proth number""")
																		continue

												print(f"""The {number}th Proth number: {value}""")





