




"""simple docstring"""







from collections.abc import Callable

SCREAMING_SNAKE_CASE_      =					Callable[[float], float]  # type alias for a real -> real function





def     __snake_case   (							_lowercase ,_lowercase ,_lowercase ,):


    """simple docstring"""







    UpperCamelCase										=  float(_lowercase						)
    while True:
        try:
            UpperCamelCase										=  prev_guess - function(_lowercase						) / derivative(_lowercase						)
        except ZeroDivisionError:
            raise ZeroDivisionError('''Could not find root'''						) from None
        if abs(prev_guess - next_guess						) < 10**-5:
            return next_guess
        UpperCamelCase										=  next_guess





def     __snake_case   (							_lowercase						):


    """simple docstring"""







    return (x**3) - (2 * x) - 5





def     __snake_case   (							_lowercase						):


    """simple docstring"""







    return 3 * (x**2) - 2


if __name__ == "__main__":
  print(newton(f, fa, 3))





"""simple docstring"""







import torch

from transformers import PreTrainedModel

from .custom_configuration import CustomConfig, NoSuperInitConfig

class 							snake_case_ (				lowerCamelCase_ ):







   """simple docstring"""




   A_										=					CustomConfig







   def __init__(		self					,				lowerCamelCase_)							->      List[Any]:
       super().__init__(lowerCamelCase_)
       UpperCamelCase										=  torch.nn.Linear(config.hidden_size					,				config.hidden_size)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      Optional[Any]:
       return self.linear(lowerCamelCase_)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      List[str]:
       pass

class 							snake_case_ (				lowerCamelCase_ ):







   """simple docstring"""




   A_										=					NoSuperInitConfig







   def __init__(		self					,				lowerCamelCase_)							->      Optional[int]:
       super().__init__(lowerCamelCase_)
       UpperCamelCase										=  torch.nn.Linear(config.attribute					,				config.attribute)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      int:
       return self.linear(lowerCamelCase_)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      Any:
       pass