


'''simple docstring'''


from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike





class        lowercase__    (		_snake_case   ):





							'''simple docstring'''


							def __init__(       self       ,   __snake_case = None       ,   __snake_case = None       ,   __snake_case = None       ,   __snake_case = None       ,   __snake_case = False       ,   __snake_case = False       ,   __snake_case = None       ,   **__snake_case       ,   ):
											_SCREAMING_SNAKE_CASE					:			Optional[Any]							= path_or_paths
											_SCREAMING_SNAKE_CASE					:			Optional[Any]							= split if split or isinstance(__snake_case       ,   __snake_case    ) else """train"""
											_SCREAMING_SNAKE_CASE					:			List[str]							= features
											_SCREAMING_SNAKE_CASE					:			int							= cache_dir
											_SCREAMING_SNAKE_CASE					:			str							= keep_in_memory
											_SCREAMING_SNAKE_CASE					:			Any							= streaming
											_SCREAMING_SNAKE_CASE					:			Any							= num_proc
											_SCREAMING_SNAKE_CASE					:			List[str]							= kwargs






							@abstractmethod
							def UpperCAmelCase_      (       self    ):
											pass





class        lowercase__    (		_snake_case   ):





							'''simple docstring'''


							def __init__(       self       ,   __snake_case = None       ,   __snake_case = None       ,   __snake_case = False       ,   __snake_case = False       ,   __snake_case = None       ,   **__snake_case       ,   ):
											_SCREAMING_SNAKE_CASE					:			int							= features
											_SCREAMING_SNAKE_CASE					:			str							= cache_dir
											_SCREAMING_SNAKE_CASE					:			List[Any]							= keep_in_memory
											_SCREAMING_SNAKE_CASE					:			str							= streaming
											_SCREAMING_SNAKE_CASE					:			List[Any]							= num_proc
											_SCREAMING_SNAKE_CASE					:			Union[str, Any]							= kwargs






							@abstractmethod
							def UpperCAmelCase_      (       self    ):
											pass








'''simple docstring'''


import math







def      snake_case_  (    SCREAMING_SNAKE_CASE__	):







				"""simple docstring"""





				assert isinstance(SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__	) and (
				    number >= 0
				), "'number' must been an int and positive"

				if 1 < number < 4:
								# 2 and 3 are primes
								return True
				elif number < 2 or not number % 2:
								# Negatives, 0, 1 and all even numbers are not primes
								return False

				_SCREAMING_SNAKE_CASE					:			List[str]							= range(3				, int(math.sqrt(SCREAMING_SNAKE_CASE__	) + 1	)				, 2	)
				return not any(not number % i for i in odd_numbers	)







def      snake_case_  (    SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__=1				, **SCREAMING_SNAKE_CASE__	):







				"""simple docstring"""





				_SCREAMING_SNAKE_CASE					:			Dict							= factor * value
				_SCREAMING_SNAKE_CASE					:			Optional[Any]							= value

				while not is_prime(SCREAMING_SNAKE_CASE__	):
								value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

				if value == first_value_val:
								return next_prime(value + 1				, **SCREAMING_SNAKE_CASE__	)
				return value




