



from dataclasses import dataclass
from typing import Callable, Optional

import datasets




@dataclass
class 				lowerCAmelCase__	(						datasets.BuilderConfig    ):
					__A  :     Optional[Callable]     =    None
					__A  :     Optional[dict]     =    None
					__A  :     Optional[datasets.Features]     =    None







					def 			_lowercase      (							self   :  Optional[int]):
											assert self.generator is not None, "generator must be specified"

											if self.gen_kwargs is None:
																	A__						:				int         =			{}




class 				lowerCAmelCase__	(						datasets.GeneratorBasedBuilder    ):
					__A  :     Tuple     =    GeneratorConfig







					def 			_lowercase      (							self   :  Union[str, Any]):
											return datasets.DatasetInfo(features=self.config.features)







					def 			_lowercase      (							self   :  Dict      ,		_A   :  int):
											return [datasets.SplitGenerator(name=datasets.Split.TRAIN      ,		gen_kwargs=self.config.gen_kwargs)]







					def 			_lowercase      (							self   :  int      ,		**_A   :  List[str]):
											for idx, ex in enumerate(self.config.generator(**_A)):
																	yield idx, ex




from itertools import compress, repeat
from math import ceil, sqrt
def 						snake_case__							(       __lowercase							)		->		list[int]:







						"""simple docstring"""

						if num <= 2:
												return []
						if num == 3:
												return [2]

						# Odd sieve for numbers in range [3, num - 1]
						A__						:				Dict         =			bytearray(b"\x01"							) * ((num >> 1) - 1)

						for i in range(3				,  int(sqrt(__lowercase							)							) + 1				,  2							):
												if sieve[(i >> 1) - 1]:
																		A__						:				int         =			i**2
																		A__						:				List[str]         =			repeat(
																		    0				,  ceil((num - i_squared) / (i << 1)							)							)

						return [2] + list(compress(range(3				,  __lowercase				,  2							)				,  __lowercase							)							)


if __name__ == "__main__":
		import doctest

		doctest.testmod()