



def 				_lowerCAmelCase   (     lowercase_	,			lowercase_	,			lowercase_		):
						if common_ratio == 1:
												# Formula for sum if common ratio is 1
												return num_of_terms * first_term

						# Formula for finding sum of n terms of a GeometricProgression
						return (first_term / (1 - common_ratio)) * (1 - common_ratio**num_of_terms)










"""simple docstring"""


from dataclasses import dataclass
from typing import Callable, Optional

import datasets







@dataclass
class    A_    (  datasets.BuilderConfig       ):



						"""simple docstring"""
						__UpperCamelCase	       =							None
						__UpperCamelCase	       =							None
						__UpperCamelCase	       =							None






						def 			UpperCAmelCase__  (      self				:str      )       ->    Optional[Any]:
												assert self.generator is not None, "generator must be specified"

												if self.gen_kwargs is None:
																		UpperCAmelCase    =				{}







class    A_    (  datasets.GeneratorBasedBuilder       ):



						"""simple docstring"""
						__UpperCamelCase	       =							GeneratorConfig






						def 			UpperCAmelCase__  (      self				:Union[str, Any]      )       ->    str:
												return datasets.DatasetInfo(features=self.config.features      )






						def 			UpperCAmelCase__  (      self				:List[Any]     ,						lowercase_				:List[Any]      )       ->    Union[str, Any]:
												return [datasets.SplitGenerator(name=datasets.Split.TRAIN     ,						gen_kwargs=self.config.gen_kwargs      )]






						def 			UpperCAmelCase__  (      self				:Optional[int]     ,						**lowercase_				:Dict      )       ->    str:
												for idx, ex in enumerate(self.config.generator(**lowercase_      )      ):
																		yield idx, ex





