



'''simple docstring'''


def 			UpperCAmelCase_							(		lowercase__							):


     '''simple docstring'''







     if not isinstance(lowercase__							,						lowercase__							):
          a_									=F"""Input value of [number={number}] must be an integer"""
          raise TypeError(lowercase__							)
     if number < 1:
          raise ValueError("Input must be a positive integer"							)
     return number * (2 * number - 1)


if __name__ == "__main__":
  import doctest

  doctest.testmod()







'''simple docstring'''


from dataclasses import dataclass
from typing import Callable, Optional

import datasets







@dataclass
class 						UpperCAmelCase						(		datasets.BuilderConfig):


 '''simple docstring'''




 __magic_name__       :			Optional[Callable]	=   None
 __magic_name__       :			Optional[dict]	=   None
 __magic_name__       :			Optional[datasets.Features]	=   None




 def    lowercase_	( self)			->   List[Any]:



      """simple docstring"""







      assert self.generator is not None, "generator must be specified"

      if self.gen_kwargs is None:
           a_									={}







class 						UpperCAmelCase						(		datasets.GeneratorBasedBuilder):


 '''simple docstring'''




 __magic_name__       :			Tuple	=   GeneratorConfig




 def    lowercase_	( self)			->   Tuple:



      """simple docstring"""







      return datasets.DatasetInfo(features=self.config.features)




 def    lowercase_	( self				,	lowerCAmelCase_)			->   int:



      """simple docstring"""







      return [datasets.SplitGenerator(name=datasets.Split.TRAIN				,	gen_kwargs=self.config.gen_kwargs)]




 def    lowercase_	( self				,	**lowerCAmelCase_)			->   List[Any]:



      """simple docstring"""







      for idx, ex in enumerate(self.config.generator(**lowerCAmelCase_)):
           yield idx, ex


