


from __future__ import annotations




def   lowerCamelCase_       (					UpperCAmelCase__       ,    UpperCAmelCase__       ,    UpperCAmelCase__      ):



						"""simple docstring"""




						assert n > 1 and a > 0 and greatest_common_divisor(UpperCAmelCase__       ,    UpperCAmelCase__      ) == 1
						((a_)			,   (a_)			,   (a_))					=		extended_gcd(UpperCAmelCase__       ,    UpperCAmelCase__      )  # Implemented below
						a_					=		(b * s) % n
						return x




def   lowerCamelCase_       (					UpperCAmelCase__       ,    UpperCAmelCase__      ):



						"""simple docstring"""




						((a_)			,   (a_))					=		extended_euclid(UpperCAmelCase__       ,    UpperCAmelCase__      )  # Implemented below
						if b < 0:
												a_					=		(b % n + n) % n
						return b




def   lowerCamelCase_       (					UpperCAmelCase__       ,    UpperCAmelCase__       ,    UpperCAmelCase__      ):



						"""simple docstring"""




						a_					=		invert_modulo(UpperCAmelCase__       ,    UpperCAmelCase__      )
						a_					=		(b * s) % n
						return x




def   lowerCamelCase_       (					UpperCAmelCase__       ,    UpperCAmelCase__      ):



						"""simple docstring"""




						assert a >= 0 and b >= 0

						if b == 0:
												a_			,   a_			,   a_					=		a, 1, 0
						else:
												((a_)			,   (a_)			,   (a_))					=		extended_gcd(UpperCAmelCase__       ,    a % b      )
												a_					=		q
												a_					=		p - q * (a // b)

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

						return (d, x, y)




def   lowerCamelCase_       (					UpperCAmelCase__       ,    UpperCAmelCase__      ):



						"""simple docstring"""




						if b == 0:
												return (1, 0)
						((a_)			,   (a_))					=		extended_euclid(UpperCAmelCase__       ,    a % b      )
						a_					=		a // b
						return (y, x - k * y)




def   lowerCamelCase_       (					UpperCAmelCase__       ,    UpperCAmelCase__      ):



						"""simple docstring"""




						if a < b:
												a_			,   a_					=		b, a

						while a % b != 0:
												a_			,   a_					=		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)



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A_    :					Optional[Any]             ={
    """configuration_wav2vec2_conformer""": [
        """WAV2VEC2_CONFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """Wav2Vec2ConformerConfig""",
    ],
}


try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A_    :					Union[str, Any]             =[
	    """WAV2VEC2_CONFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """Wav2Vec2ConformerForAudioFrameClassification""",
	    """Wav2Vec2ConformerForCTC""",
	    """Wav2Vec2ConformerForPreTraining""",
	    """Wav2Vec2ConformerForSequenceClassification""",
	    """Wav2Vec2ConformerForXVector""",
	    """Wav2Vec2ConformerModel""",
	    """Wav2Vec2ConformerPreTrainedModel""",
	]

if TYPE_CHECKING:
	from .configuration_wavaveca_conformer import (
	    WAV2VEC2_CONFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    WavaVecaConformerConfig,
	)

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_wavaveca_conformer import (
		    WAV2VEC2_CONFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    WavaVecaConformerForAudioFrameClassification,
		    WavaVecaConformerForCTC,
		    WavaVecaConformerForPreTraining,
		    WavaVecaConformerForSequenceClassification,
		    WavaVecaConformerForXVector,
		    WavaVecaConformerModel,
		    WavaVecaConformerPreTrainedModel,
		)

else:
	import sys

	A_    :					Union[str, Any]             =_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)