

import timeit

import numpy as np

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


def 							__lowerCAmelCase     (							_UpperCamelCase		:	str						)		->				List[str]:
 '''simple docstring'''


 def wrapper(*_UpperCamelCase		:	Optional[int]		,				**_UpperCamelCase		:	List[Any]						):
  SCREAMING_SNAKE_CASE		    =      timeit.default_timer()
  SCREAMING_SNAKE_CASE		    =      func(*_UpperCamelCase		,				**_UpperCamelCase						)
  SCREAMING_SNAKE_CASE		    =      timeit.default_timer() - starttime
  return delta

 SCREAMING_SNAKE_CASE		    =      func.__name__

 return wrapper


def 							__lowerCAmelCase     (							_UpperCamelCase		:	dict		,				_UpperCamelCase		:	List[str]=1_00		,				_UpperCamelCase		:	Dict=None						)		->				Optional[int]:
 '''simple docstring'''


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

  dummy_data.append((i, example)						)

 return dummy_data




def 							__lowerCAmelCase     (							_UpperCamelCase		:	List[Any]		,				_UpperCamelCase		:	str		,				_UpperCamelCase		:	Tuple=1_00		,				_UpperCamelCase		:	Any=None						)		->				str:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      generate_examples(_UpperCamelCase		,				num_examples=_UpperCamelCase		,				seq_shapes=_UpperCamelCase						)

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

  SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE		    =      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}."""						)

 SCREAMING_SNAKE_CASE		    =      datasets.Dataset.from_file(filename=_UpperCamelCase		,				info=datasets.DatasetInfo(features=_UpperCamelCase						)						)

 return dataset




def 							__lowerCAmelCase     (							_UpperCamelCase		:	List[str]=2_81_23						)		->				str:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      [1] * (limit + 1)

 for i in range(2		,				int(limit**0.5						) + 1						):
  sum_divs[i * i] += i
  for k in range(i + 1		,				limit // i + 1						):
   sum_divs[k * i] += k + i

 SCREAMING_SNAKE_CASE		    =      set()
 SCREAMING_SNAKE_CASE		    =      0

 for n in range(1		,				limit + 1						):
  if sum_divs[n] > n:
   abundants.add(_UpperCamelCase						)

  if not any((n - a in abundants) for a in abundants						):
   res += n

 return res


if __name__ == "__main__":
      print(solution())

