'''simple docstring'''

from __future__ import annotations

from enum import Enum







class     _lowercase					(    lowerCAmelCase__      ):


 '''simple docstring'''






 _SCREAMING_SNAKE_CASE					:	Dict				     = 24
 _SCREAMING_SNAKE_CASE					:	Dict				     = 21
 _SCREAMING_SNAKE_CASE					:	Union[str, Any]				     = 18
 _SCREAMING_SNAKE_CASE					:	Dict				     = 15
 _SCREAMING_SNAKE_CASE					:	Any				     = 12
 _SCREAMING_SNAKE_CASE					:	Union[str, Any]				     = 9
 _SCREAMING_SNAKE_CASE					:	Any				     = 6
 _SCREAMING_SNAKE_CASE					:	Optional[Any]				     = 3
 _SCREAMING_SNAKE_CASE					:	Union[str, Any]				     = 2
 _SCREAMING_SNAKE_CASE					:	List[Any]				     = 1
 _SCREAMING_SNAKE_CASE					:	Optional[Any]				     = -1
 _SCREAMING_SNAKE_CASE					:	Tuple				     = -2
 _SCREAMING_SNAKE_CASE					:	Dict				     = -3
 _SCREAMING_SNAKE_CASE					:	Union[str, Any]				     = -6
 _SCREAMING_SNAKE_CASE					:	Any				     = -9
 _SCREAMING_SNAKE_CASE					:	Union[str, Any]				     = -12
 _SCREAMING_SNAKE_CASE					:	str				     = -15
 _SCREAMING_SNAKE_CASE					:	Optional[int]				     = -18
 _SCREAMING_SNAKE_CASE					:	Any				     = -21
 _SCREAMING_SNAKE_CASE					:	Any				     = -24







class     _lowercase					(    lowerCAmelCase__      ):


 '''simple docstring'''






 _SCREAMING_SNAKE_CASE					:	Tuple				     = 8
 _SCREAMING_SNAKE_CASE					:	Union[str, Any]				     = 7
 _SCREAMING_SNAKE_CASE					:	Optional[Any]				     = 6
 _SCREAMING_SNAKE_CASE					:	Tuple				     = 5
 _SCREAMING_SNAKE_CASE					:	Optional[int]				     = 4
 _SCREAMING_SNAKE_CASE					:	Optional[int]				     = 3
 _SCREAMING_SNAKE_CASE					:	Optional[int]				     = 2
 _SCREAMING_SNAKE_CASE					:	Any				     = 1







def 					UpperCamelCase_						( snake_case_	:	float						,		snake_case_	:	str | SIUnit						,		snake_case_	:	str | SIUnit						,		) ->					float:






 '''simple docstring'''

 if isinstance(snake_case_						,		snake_case_				):
  __lowerCAmelCase    							=						SIUnit[known_prefix.lower()]
 if isinstance(snake_case_						,		snake_case_				):
  __lowerCAmelCase    							=						SIUnit[unknown_prefix.lower()]
 __lowerCAmelCase    							=						known_amount * (
     10 ** (known_prefix.value - unknown_prefix.value)
 )
 return unknown_amount







def 					UpperCamelCase_						( snake_case_	:	float						,		snake_case_	:	str | BinaryUnit						,		snake_case_	:	str | BinaryUnit						,		) ->					float:






 '''simple docstring'''

 if isinstance(snake_case_						,		snake_case_				):
  __lowerCAmelCase    							=						BinaryUnit[known_prefix.lower()]
 if isinstance(snake_case_						,		snake_case_				):
  __lowerCAmelCase    							=						BinaryUnit[unknown_prefix.lower()]
 __lowerCAmelCase    							=						known_amount * (
     2 ** ((known_prefix.value - unknown_prefix.value) * 10)
 )
 return unknown_amount


if __name__ == "__main__":
    import doctest

    doctest.testmod()







'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


_A      :				Optional[int] 				=    {
    '''configuration_speech_to_text_2''': ['''SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''Speech2Text2Config'''],
    '''processing_speech_to_text_2''': ['''Speech2Text2Processor'''],
    '''tokenization_speech_to_text_2''': ['''Speech2Text2Tokenizer'''],
}


try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _A      :				Any 				=    [
     '''SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''Speech2Text2ForCausalLM''',
     '''Speech2Text2PreTrainedModel''',
 ]


if TYPE_CHECKING:
 from .configuration_speech_to_text_a import SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP, SpeechaTextaConfig
 from .processing_speech_to_text_a import SpeechaTextaProcessor
 from .tokenization_speech_to_text_a import SpeechaTextaTokenizer

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_speech_to_text_a import (
      SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST,
      SpeechaTextaForCausalLM,
      SpeechaTextaPreTrainedModel,
  )

else:
 import sys

 _A      :				Tuple 				=    _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)






