



from typing import Callable, Optional

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

class       _SCREAMING_SNAKE_CASE	(UpperCAmelCase_ ):





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






					def 	__snake_case    (       self :							int				)->Optional[Any]:
						# Build iterable dataset
						if self.streaming:
							__SCREAMING_SNAKE_CASE       :    Tuple       =	self.builder.as_streaming_dataset(split="train"				)
						# Build regular (map-style) dataset
						else:
							__SCREAMING_SNAKE_CASE       :    Any       =	None
							__SCREAMING_SNAKE_CASE       :    List[Any]       =	None
							__SCREAMING_SNAKE_CASE       :    int       =	None
							__SCREAMING_SNAKE_CASE       :    Dict       =	None

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











from math import sqrt






def 	_lowerCAmelCase						(				__lowerCamelCase   :     int = 1000000     ):



 """simple docstring"""





 __SCREAMING_SNAKE_CASE       :    int       =	0
 __SCREAMING_SNAKE_CASE       :    int       =	0
 __SCREAMING_SNAKE_CASE       :    int

 while num_cuboids <= limit:
  max_cuboid_size += 1
  for sum_shortest_sides in range(2		,	2 * max_cuboid_size + 1     ):
   if sqrt(sum_shortest_sides**2 + max_cuboid_size**2     ).is_integer():
    num_cuboids += (
        min(__lowerCamelCase		,	sum_shortest_sides // 2     )
        - max(1		,	sum_shortest_sides - max_cuboid_size     )
        + 1
    )

 return max_cuboid_size


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






