




'''simple docstring'''
import warnings
from contextlib import contextmanager

from ...processing_utils import ProcessorMixin
class      __UpperCAmelCase							(    lowerCAmelCase							):



					'''simple docstring'''





					_UpperCamelCase  	=		["""image_processor""", """tokenizer"""]
					_UpperCamelCase  	=		"""AutoImageProcessor"""
					_UpperCamelCase  	=		"""AutoTokenizer"""



					def __init__(  self    :	Tuple			,					_lowercase    :	Union[str, Any]=None			,					_lowercase    :	Optional[int]=None			,					**_lowercase    :	List[Any])						->       Union[str, Any]:
								A_       		=   None
								if "feature_extractor" in kwargs:
											warnings.warn(
											    'The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'
											    ' instead.'			,					_lowercase			,					)
											A_       		=   kwargs.pop('feature_extractor')

								A_       		=   image_processor if image_processor is not None else feature_extractor
								if image_processor is None:
											raise ValueError('You need to specify an `image_processor`.')
								if tokenizer is None:
											raise ValueError('You need to specify a `tokenizer`.')

								super().__init__(_lowercase			,					_lowercase)
								A_       		=   self.image_processor
								A_       		=   False



					def __call__(  self    :	str			,					*_lowercase    :	Union[str, Any]			,					**_lowercase    :	str)						->       List[str]:
								# For backward compatibility
								if self._in_target_context_manager:
											return self.current_processor(*_lowercase			,					**_lowercase)

								A_       		=   kwargs.pop('images'			,					_lowercase)
								A_       		=   kwargs.pop('text'			,					_lowercase)
								if len(_lowercase) > 0:
											A_       		=   args[0]
											A_       		=   args[1:]

								if images is None and text is None:
											raise ValueError('You need to specify either an `images` or `text` input to process.')

								if images is not None:
											A_       		=   self.image_processor(_lowercase			,					*_lowercase			,					**_lowercase)
								if text is not None:
											A_       		=   self.tokenizer(_lowercase			,					**_lowercase)

								if text is None:
											return inputs
								elif images is None:
											return encodings
								else:
											A_       		=   encodings['input_ids']
											return inputs



					def 						__snake_case	(  self    :	Optional[Any]			,					*_lowercase    :	Any			,					**_lowercase    :	Any)						->       Dict:
								return self.tokenizer.batch_decode(*_lowercase			,					**_lowercase)



					def 						__snake_case	(  self    :	Any			,					*_lowercase    :	Optional[int]			,					**_lowercase    :	List[str])						->       Any:
								return self.tokenizer.decode(*_lowercase			,					**_lowercase)



					@contextmanager
					def 						__snake_case	(  self    :	Optional[int])						->       Any:
								warnings.warn(
								    '`as_target_processor` is deprecated and will be removed in v5 of Transformers. You can process your '
								    'labels by using the argument `text` of the regular `__call__` method (either in the same call as '
								    'your images inputs, or in a separate call.')
								A_       		=   True
								A_       		=   self.tokenizer
								yield
								A_       		=   self.image_processor
								A_       		=   False



					@property
					def 						__snake_case	(  self    :	Union[str, Any])						->       Union[str, Any]:
								warnings.warn(
								    '`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'			,					_lowercase			,					)
								return self.image_processor_class



					@property
					def 						__snake_case	(  self    :	Optional[int])						->       Any:
								warnings.warn(
								    '`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'			,					_lowercase			,					)
								return self.image_processor










'''simple docstring'''
from __future__ import annotations

import sys





def  lowerCamelCase(       SCREAMING_SNAKE_CASE_					,SCREAMING_SNAKE_CASE_    )		->		tuple[int, int]:
			# base cases
			if abs(SCREAMING_SNAKE_CASE_    ) == 1:
						return a, 0
			elif abs(SCREAMING_SNAKE_CASE_    ) == 1:
						return 0, b

			A_		,   A_       		=   a, b
			A_		,   A_       		=   1, 0
			A_		,   A_       		=   0, 1

			while remainder != 0:
						A_       		=   old_remainder // remainder
						A_		,   A_       		=   remainder, old_remainder - quotient * remainder
						A_		,   A_       		=   coeff_a, old_coeff_a - quotient * coeff_a
						A_		,   A_       		=   coeff_b, old_coeff_b - quotient * coeff_b

			# sign correction for negative numbers
			if a < 0:
						A_       		=   -old_coeff_a
			if b < 0:
						A_       		=   -old_coeff_b

			return old_coeff_a, old_coeff_b





def  lowerCamelCase(       )		->		Tuple:
			if len(sys.argv    ) < 3:
						print('2 integer arguments required'    )
						return 1
			A_       		=   int(sys.argv[1]    )
			A_       		=   int(sys.argv[2]    )
			print(extended_euclidean_algorithm(SCREAMING_SNAKE_CASE_					,SCREAMING_SNAKE_CASE_    )    )
			return 0


if __name__ == "__main__":
							raise SystemExit(main())




