



import timeit

import numpy as np

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





def 							A			(  _UpperCAmelCase       :     Tuple					)       ->				Any:







			'''simple docstring'''
			def wrapper(*_UpperCAmelCase       :     str							,     **_UpperCAmelCase       :     Optional[Any]					):
						_UpperCAmelCase	 =     timeit.default_timer()
						_UpperCAmelCase	 =     func(*_UpperCAmelCase							,     **_UpperCAmelCase					)
						_UpperCAmelCase	 =     timeit.default_timer() - starttime
						return delta

			_UpperCAmelCase	 =     func.__name__

			return wrapper





def 							A			(  _UpperCAmelCase       :     dict							,     _UpperCAmelCase       :     List[Any]=100							,     _UpperCAmelCase       :     int=None					)       ->				str:







			'''simple docstring'''
			_UpperCAmelCase	 =     []
			_UpperCAmelCase	 =     seq_shapes or {}
			for i in range(_UpperCAmelCase					):
						_UpperCAmelCase	 =     {}
						for col_id, (k, v) in enumerate(features.items()					):
									if isinstance(_UpperCAmelCase							,     _ArrayXD					):
												_UpperCAmelCase	 =     np.random.rand(*v.shape					).astype(v.dtype					)
									elif isinstance(_UpperCAmelCase							,     datasets.Value					):
												if v.dtype == "string":
															_UpperCAmelCase	 =     'The small grey turtle was surprisingly fast when challenged.'
												else:
															_UpperCAmelCase	 =     np.random.randint(10							,     size=1					).astype(v.dtype					).item()
									elif isinstance(_UpperCAmelCase							,     datasets.Sequence					):
												while isinstance(_UpperCAmelCase							,     datasets.Sequence					):
															_UpperCAmelCase	 =     v.feature
												_UpperCAmelCase	 =     seq_shapes[k]
												_UpperCAmelCase	 =     np.random.rand(*_UpperCAmelCase					).astype(v.dtype					)
									_UpperCAmelCase	 =     data

						dummy_data.append((i, example)					)

			return dummy_data





def 							A			(  _UpperCAmelCase       :     str							,     _UpperCAmelCase       :     Tuple							,     _UpperCAmelCase       :     List[Any]=100							,     _UpperCAmelCase       :     str=None					)       ->				Dict:







			'''simple docstring'''
			_UpperCAmelCase	 =     generate_examples(_UpperCAmelCase							,     num_examples=_UpperCAmelCase							,     seq_shapes=_UpperCAmelCase					)

			with ArrowWriter(features=_UpperCAmelCase							,     path=_UpperCAmelCase					) as writer:
						for key, record in dummy_data:
									_UpperCAmelCase	 =     features.encode_example(_UpperCAmelCase					)
									writer.write(_UpperCAmelCase					)

						_UpperCAmelCase ,  _UpperCAmelCase	 =     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	 =     datasets.Dataset.from_file(filename=_UpperCAmelCase							,     info=datasets.DatasetInfo(features=_UpperCAmelCase					)					)

			return dataset





def 							A			(  _UpperCAmelCase       :     int							,     _UpperCAmelCase       :     int					)       ->				int:







			'''simple docstring'''
			while second != 0:
						_UpperCAmelCase	 =     first & second
						first ^= second
						_UpperCAmelCase	 =     c << 1
			return first


if __name__ == "__main__":
							import doctest

							doctest.testmod()

							UpperCAmelCase__     = int(input("Enter the first number: ").strip())
							UpperCAmelCase__     = int(input("Enter the second number: ").strip())
							print(f"""{add(first, second) = }""")
