






from typing import Callable, Optional

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






class 						UpperCAmelCase__ (							__snake_case							):







		def __init__(					self       ,A__       ,A__ = None       ,A__ = None       ,A__ = False       ,A__ = False       ,A__ = None       ,A__ = None       ,**A__       ,):
						super().__init__(
						    features=A__       ,cache_dir=A__       ,keep_in_memory=A__       ,streaming=A__       ,num_proc=A__       ,**A__       ,)
						_A	:				Optional[Any]   =      Generator(
						    cache_dir=A__       ,features=A__       ,generator=A__       ,gen_kwargs=A__       ,**A__       ,)







		def  A__      (					self		):
						# Build iterable dataset
						if self.streaming:
										_A	:				List[Any]   =      self.builder.as_streaming_dataset(split='''train'''		)
						# Build regular (map-style) dataset
						else:
										_A	:				Union[str, Any]   =      None
										_A	:				int   =      None
										_A	:				List[str]   =      None
										_A	:				List[str]   =      None

										self.builder.download_and_prepare(
										    download_config=A__       ,download_mode=A__       ,verification_mode=A__       ,base_path=A__       ,num_proc=self.num_proc       ,)
										_A	:				Optional[Any]   =      self.builder.as_dataset(
										    split='''train'''       ,verification_mode=A__       ,in_memory=self.keep_in_memory		)
						return dataset











from __future__ import annotations



def  a__ (__lowercase							:list					,  __lowercase							:int | None = None					,  __lowercase							:int | None = None   )		-> None:
				if start is None:
								_A	:				Optional[int]   =      0

				if end is None:
								_A	:				Union[str, Any]   =      len(__lowercase   ) - 1

				if start >= end:
								return

				_A	:				Union[str, Any]   =      (start + end) // 2

				slowsort(__lowercase					,  __lowercase					,  __lowercase   )
				slowsort(__lowercase					,  mid + 1					,  __lowercase   )

				if sequence[end] < sequence[mid]:
								_A  ,				_A	:				Optional[int]   =      sequence[mid], sequence[end]

				slowsort(__lowercase					,  __lowercase					,  end - 1   )


if __name__ == "__main__":
	from doctest import testmod

	testmod()



