





"""simple docstring"""


import warnings

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


lowerCamelCase__      =      logging.get_logger(__name__)



class    __SCREAMING_SNAKE_CASE			(  _UpperCamelCase      ):







  '''simple docstring'''


  def __init__(						self      :				str    ,      *__a      :				str    ,      **__a      :				Any		)						-> None:
        warnings.warn(
            "The class ViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"
            " use ViTImageProcessor instead."    ,      __a    ,      )
        super().__init__(*__a    ,      **__a		)







"""simple docstring"""


from __future__ import annotations




def     lowercase__			(    lowercase_						,lowercase_						,lowercase_	)    ->						int:




      """simple docstring"""

      assert n > 1 and a > 0 and greatest_common_divisor(lowercase_						,lowercase_	) == 1
      ((_UpperCamelCase),     (_UpperCamelCase),     (_UpperCamelCase))					:		int  =				extended_gcd(lowercase_						,lowercase_	)  # Implemented below
      _UpperCamelCase					:		Any  =				(b * s) % n
      return x




def     lowercase__			(    lowercase_						,lowercase_	)    ->						int:




      """simple docstring"""

      ((_UpperCamelCase),     (_UpperCamelCase))					:		List[Any]  =				extended_euclid(lowercase_						,lowercase_	)  # Implemented below
      if b < 0:
            _UpperCamelCase					:		Any  =				(b % n + n) % n
      return b




def     lowercase__			(    lowercase_						,lowercase_						,lowercase_	)    ->						int:




      """simple docstring"""

      _UpperCamelCase					:		Union[str, Any]  =				invert_modulo(lowercase_						,lowercase_	)
      _UpperCamelCase					:		Any  =				(b * s) % n
      return x




def     lowercase__			(    lowercase_						,lowercase_	)    ->						tuple[int, int, int]:




      """simple docstring"""

      assert a >= 0 and b >= 0

      if b == 0:
            _UpperCamelCase,     _UpperCamelCase,     _UpperCamelCase					:		str  =				a, 1, 0
      else:
            ((_UpperCamelCase),     (_UpperCamelCase),     (_UpperCamelCase))					:		str  =				extended_gcd(lowercase_						,a % b	)
            _UpperCamelCase					:		Dict  =				q
            _UpperCamelCase					:		Tuple  =				p - q * (a // b)

      assert a % d == 0 and b % d == 0
      assert d == a * x + b * y

      return (d, x, y)




def     lowercase__			(    lowercase_						,lowercase_	)    ->						tuple[int, int]:




      """simple docstring"""

      if b == 0:
            return (1, 0)
      ((_UpperCamelCase),     (_UpperCamelCase))					:		Optional[Any]  =				extended_euclid(lowercase_						,a % b	)
      _UpperCamelCase					:		Dict  =				a // b
      return (y, x - k * y)




def     lowercase__			(    lowercase_						,lowercase_	)    ->						int:




      """simple docstring"""

      if a < b:
            _UpperCamelCase,     _UpperCamelCase					:		List[Any]  =				b, a

      while a % b != 0:
            _UpperCamelCase,     _UpperCamelCase					:		List[Any]  =				b, a % b

      return b


if __name__ == "__main__":
  from doctest import testmod

  testmod(name="modular_division", verbose=True)
  testmod(name="modular_division2", verbose=True)
  testmod(name="invert_modulo", verbose=True)
  testmod(name="extended_gcd", verbose=True)
  testmod(name="extended_euclid", verbose=True)
  testmod(name="greatest_common_divisor", verbose=True)
