





'''simple docstring'''






# Lint as: python3
import dataclasses
import re
from dataclasses import dataclass
from functools import total_ordering
from typing import Optional, Union


A   : Any             =			re.compile(r'^(?P<major>\d+)' r'\.(?P<minor>\d+)' r'\.(?P<patch>\d+)$')







@total_ordering
@dataclass
class 			lowerCamelCase					:
					_SCREAMING_SNAKE_CASE							   =    42
					_SCREAMING_SNAKE_CASE							   =    None
					_SCREAMING_SNAKE_CASE							   =    None
					_SCREAMING_SNAKE_CASE							   =    None
					_SCREAMING_SNAKE_CASE							   =    None


					def    SCREAMING_SNAKE_CASE_		(					self	:  Tuple       ):





											'''simple docstring'''





											_snake_case					,						_snake_case					,						_snake_case:   Tuple  					=		_str_to_version_tuple(self.version_str       )


					def __repr__(					self	:  Dict       ):





											'''simple docstring'''





											return f'''{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}'''


					@property
					def    SCREAMING_SNAKE_CASE_		(					self	:  List[Any]       ):





											'''simple docstring'''





											return self.major, self.minor, self.patch


					def    SCREAMING_SNAKE_CASE_		(					self	:  str       ,     __snake_case	:  List[Any]       ):





											'''simple docstring'''





											if isinstance(__snake_case       ,     __snake_case       ):
																	return Version(__snake_case       )
											elif isinstance(__snake_case       ,     __snake_case       ):
																	return other
											raise TypeError(f'''{other} (type {type(__snake_case       )}) cannot be compared to version.'''       )


					def __eq__(					self	:  Any       ,     __snake_case	:  List[str]       ):





											'''simple docstring'''





											try:
																	_snake_case:   str  					=		self._validate_operand(__snake_case       )
											except (TypeError, ValueError):
																	return False
											else:
																	return self.tuple == other.tuple


					def __lt__(					self	:  int       ,     __snake_case	:  Tuple       ):





											'''simple docstring'''





											_snake_case:   str  					=		self._validate_operand(__snake_case       )
											return self.tuple < other.tuple


					def __hash__(					self	:  Any       ):





											'''simple docstring'''





											return hash(_version_tuple_to_str(self.tuple       )       )


					@classmethod
					def    SCREAMING_SNAKE_CASE_		(					cls	:  str       ,     __snake_case	:  int       ):





											'''simple docstring'''





											_snake_case:   Optional[int]  					=		{f.name for f in dataclasses.fields(cls       )}
											return cls(**{k: v for k, v in dic.items() if k in field_names}       )




					def    SCREAMING_SNAKE_CASE_		(					self	:  List[str]       ):





											'''simple docstring'''





											return self.version_str





def       lowercase_      (		lowercase__						)   ->Any:
						_snake_case:   Dict  					=		_VERSION_REG.match(lowercase__						)
						if not res:
												raise ValueError(F'''Invalid version \'{version_str}\'. Format should be x.y.z with {{x,y,z}} being digits.'''						)
						return tuple(int(lowercase__						) for v in [res.group('major'						), res.group('minor'						), res.group('patch'						)]						)





def       lowercase_      (		lowercase__						)   ->Optional[Any]:
						return ".".join(str(lowercase__						) for v in version_tuple						)












'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_flax_available, is_torch_available


A   : Dict             =			{'configuration_speech_encoder_decoder': ['SpeechEncoderDecoderConfig']}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A   : int             =			['SpeechEncoderDecoderModel']

try:
		if not is_flax_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A   : Union[str, Any]             =			['FlaxSpeechEncoderDecoderModel']

if TYPE_CHECKING:
		from .configuration_speech_encoder_decoder import SpeechEncoderDecoderConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_speech_encoder_decoder import SpeechEncoderDecoderModel

		try:
				if not is_flax_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_flax_speech_encoder_decoder import FlaxSpeechEncoderDecoderModel

else:
		import sys

		A   : int             =			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





