

import warnings

from ...utils import logging
from .image_processing_vit import ViTImageProcessor


lowercase     :       Optional[Any]        =       logging.get_logger(__name__)
class 		SCREAMING_SNAKE_CASE__					(		lowerCamelCase__   ):







						"""simple docstring"""




						def __init__(				self , *__UpperCamelCase , **__UpperCamelCase    )							->	None:




									'''simple docstring'''


									warnings.warn(
									    "The class ViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"
									    " use ViTImageProcessor instead." , __UpperCamelCase , )
									super().__init__(*__UpperCamelCase , **__UpperCamelCase    )


from collections.abc import Callable

lowercase     :       Optional[Any]        =       Callable[[float], float]  # type alias for a real -> real function







def  UpperCAmelCase_   (_lowerCAmelCase :		RealFunc     ,			_lowerCAmelCase :		RealFunc     ,			_lowerCAmelCase :		int     ,			):
			__UpperCamelCase    :    Any								=      float(_lowerCAmelCase		)
			while True:
						try:
									__UpperCamelCase    :    List[Any]								=      prev_guess - function(_lowerCAmelCase		) / derivative(_lowerCAmelCase		)
						except ZeroDivisionError:
									raise ZeroDivisionError("Could not find root"		) from None
						if abs(prev_guess - next_guess		) < 10**-5:
									return next_guess
						__UpperCamelCase    :    Tuple								=      next_guess







def  UpperCAmelCase_   (_lowerCAmelCase :		float		):
			return (x**3) - (2 * x) - 5







def  UpperCAmelCase_   (_lowerCAmelCase :		float		):
			return 3 * (x**2) - 2


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