



from dataclasses import dataclass
from typing import Callable, Optional

import datasets





@dataclass
class  __lowerCAmelCase			(					datasets.BuilderConfig	):
				__lowerCamelCase			=    None
				__lowerCamelCase			=    None
				__lowerCamelCase			=    None




				def 							snake_case       (							self		):



									"""simple docstring"""





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

									if self.gen_kwargs is None:
														_lowerCAmelCase      =   {}





class  __lowerCAmelCase			(					datasets.GeneratorBasedBuilder	):
				__lowerCamelCase			=    GeneratorConfig




				def 							snake_case       (							self		):



									"""simple docstring"""





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




				def 							snake_case       (							self						,    _snake_case		):



									"""simple docstring"""





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




				def 							snake_case       (							self						,    **_snake_case		):



									"""simple docstring"""





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








from math import exp


def 		_UpperCAmelCase    (				snake_case      ):





					"""simple docstring"""

					return 8 * x - 2 * exp(-x      )


def 		_UpperCAmelCase    (				snake_case     ,						snake_case     ,						snake_case      ):





					"""simple docstring"""

					_lowerCAmelCase      =   lower_bound
					_lowerCAmelCase      =   upper_bound
					for _ in range(0     ,						snake_case      ):
										_lowerCAmelCase     ,     _lowerCAmelCase      =   xa, xa - (f(snake_case      ) * (xa - xa)) / (f(snake_case      ) - f(snake_case      ))
					return xa


if __name__ == "__main__":
	print(f"Example: {secant_method(1, 3, 2)}")



