



'''simple docstring'''
import timeit

import numpy as np

import datasets
from datasets.arrow_writer import ArrowWriter
from datasets.features.features import _ArrayXD






def A__    (     UpperCAmelCase_							):
						def wrapper(*UpperCAmelCase_  ,  **UpperCAmelCase_							):
												_UpperCamelCase					:		Tuple 				=   timeit.default_timer()
												_UpperCamelCase					:		Union[str, Any] 				=   func(*UpperCAmelCase_  ,  **UpperCAmelCase_							)
												_UpperCamelCase					:		Optional[Any] 				=   timeit.default_timer() - starttime
												return delta

						_UpperCamelCase					:		Union[str, Any] 				=   func.__name__

						return wrapper






def A__    (     UpperCAmelCase_  ,  UpperCAmelCase_=1_0_0  ,  UpperCAmelCase_=None							):
						_UpperCamelCase					:		str 				=   []
						_UpperCamelCase					:		List[str] 				=   seq_shapes or {}
						for i in range(UpperCAmelCase_							):
												_UpperCamelCase					:		Tuple 				=   {}
												for col_id, (k, v) in enumerate(features.items()							):
																		if isinstance(UpperCAmelCase_  ,  _ArrayXD							):
																								_UpperCamelCase					:		str 				=   np.random.rand(*v.shape							).astype(v.dtype							)
																		elif isinstance(UpperCAmelCase_  ,  datasets.Value							):
																								if v.dtype == "string":
																														_UpperCamelCase					:		Dict 				=   'The small grey turtle was surprisingly fast when challenged.'
																								else:
																														_UpperCamelCase					:		Optional[Any] 				=   np.random.randint(1_0  ,  size=1							).astype(v.dtype							).item()
																		elif isinstance(UpperCAmelCase_  ,  datasets.Sequence							):
																								while isinstance(UpperCAmelCase_  ,  datasets.Sequence							):
																														_UpperCamelCase					:		Tuple 				=   v.feature
																								_UpperCamelCase					:		Any 				=   seq_shapes[k]
																								_UpperCamelCase					:		List[Any] 				=   np.random.rand(*UpperCAmelCase_							).astype(v.dtype							)
																		_UpperCamelCase					:		int 				=   data

												dummy_data.append((i, example)							)

						return dummy_data






def A__    (     UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_=1_0_0  ,  UpperCAmelCase_=None							):
						_UpperCamelCase					:		int 				=   generate_examples(UpperCAmelCase_  ,  num_examples=UpperCAmelCase_  ,  seq_shapes=UpperCAmelCase_							)

						with ArrowWriter(features=UpperCAmelCase_  ,  path=UpperCAmelCase_							) as writer:
												for key, record in dummy_data:
																		_UpperCamelCase					:		Optional[Any] 				=   features.encode_example(UpperCAmelCase_							)
																		writer.write(UpperCAmelCase_							)

												_UpperCamelCase				,			_UpperCamelCase					:		Union[str, Any] 				=   writer.finalize()

						if not num_final_examples == num_examples:
												raise ValueError(
												    f'Error writing the dataset, wrote {num_final_examples} examples but should have written {num_examples}.'							)

						_UpperCamelCase					:		List[str] 				=   datasets.Dataset.from_file(filename=UpperCAmelCase_  ,  info=datasets.DatasetInfo(features=UpperCAmelCase_							)							)

						return dataset





def 						UpperCamelCase					(lowercase_: int = 10					)     ->      str:
	if not isinstance(lowercase_    ,      lowercase_					) or n < 0:
		raise ValueError("""Invalid input"""					)
	A__							:    List[str]        =		10**n
	A__							:    Any        =		28433 * (pow(2    ,      7830457    ,      lowercase_					)) + 1
	return str(number % modulus					)


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

	testmod()
	print(f'''{solution(10) = }''')



