


'''simple docstring'''

from __future__ import annotations

from enum import Enum







class 			UpperCAmelCase			(							SCREAMING_SNAKE_CASE__):
 _lowerCamelCase			:       List[Any]            =       24
 _lowerCamelCase			:       Optional[Any]            =       21
 _lowerCamelCase			:       int            =       18
 _lowerCamelCase			:       List[str]            =       15
 _lowerCamelCase			:       Union[str, Any]            =       12
 _lowerCamelCase			:       Optional[Any]            =       9
 _lowerCamelCase			:       Dict            =       6
 _lowerCamelCase			:       Any            =       3
 _lowerCamelCase			:       str            =       2
 _lowerCamelCase			:       int            =       1
 _lowerCamelCase			:       List[str]            =       -1
 _lowerCamelCase			:       Any            =       -2
 _lowerCamelCase			:       Tuple            =       -3
 _lowerCamelCase			:       Union[str, Any]            =       -6
 _lowerCamelCase			:       List[str]            =       -9
 _lowerCamelCase			:       List[str]            =       -12
 _lowerCamelCase			:       Any            =       -15
 _lowerCamelCase			:       Optional[Any]            =       -18
 _lowerCamelCase			:       Optional[Any]            =       -21
 _lowerCamelCase			:       int            =       -24







class 			UpperCAmelCase			(							SCREAMING_SNAKE_CASE__):
 _lowerCamelCase			:       str            =       8
 _lowerCamelCase			:       int            =       7
 _lowerCamelCase			:       str            =       6
 _lowerCamelCase			:       Optional[Any]            =       5
 _lowerCamelCase			:       List[str]            =       4
 _lowerCamelCase			:       Tuple            =       3
 _lowerCamelCase			:       List[Any]            =       2
 _lowerCamelCase			:       Any            =       1







def 							SCREAMING_SNAKE_CASE__(		_UpperCamelCase   :					float     ,		_UpperCamelCase   :					str | SIUnit     ,		_UpperCamelCase   :					str | SIUnit     ,		)		->       float:





   '''simple docstring'''







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



def 							SCREAMING_SNAKE_CASE__(		_UpperCamelCase   :					float     ,		_UpperCamelCase   :					str | BinaryUnit     ,		_UpperCamelCase   :					str | BinaryUnit     ,		)		->       float:





   '''simple docstring'''







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


if __name__ == "__main__":
       import doctest

       doctest.testmod()



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCamelCase			:					Optional[int]         =							{
    '''configuration_dpr''': ['''DPR_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DPRConfig'''],
    '''tokenization_dpr''': [
        '''DPRContextEncoderTokenizer''',
        '''DPRQuestionEncoderTokenizer''',
        '''DPRReaderOutput''',
        '''DPRReaderTokenizer''',
    ],
}


try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase			:					List[str]         =							[
					    '''DPRContextEncoderTokenizerFast''',
					    '''DPRQuestionEncoderTokenizerFast''',
					    '''DPRReaderTokenizerFast''',
					]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase			:					Optional[Any]         =							[
					    '''DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''DPRContextEncoder''',
					    '''DPRPretrainedContextEncoder''',
					    '''DPRPreTrainedModel''',
					    '''DPRPretrainedQuestionEncoder''',
					    '''DPRPretrainedReader''',
					    '''DPRQuestionEncoder''',
					    '''DPRReader''',
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase			:					Optional[int]         =							[
					    '''TF_DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''TF_DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''TF_DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''TFDPRContextEncoder''',
					    '''TFDPRPretrainedContextEncoder''',
					    '''TFDPRPretrainedQuestionEncoder''',
					    '''TFDPRPretrainedReader''',
					    '''TFDPRQuestionEncoder''',
					    '''TFDPRReader''',
					]


if TYPE_CHECKING:
					from .configuration_dpr import DPR_PRETRAINED_CONFIG_ARCHIVE_MAP, DPRConfig
					from .tokenization_dpr import (
					    DPRContextEncoderTokenizer,
					    DPRQuestionEncoderTokenizer,
					    DPRReaderOutput,
					    DPRReaderTokenizer,
					)

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_dpr_fast import (
										    DPRContextEncoderTokenizerFast,
										    DPRQuestionEncoderTokenizerFast,
										    DPRReaderTokenizerFast,
										)

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_dpr import (
										    DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    DPRContextEncoder,
										    DPRPretrainedContextEncoder,
										    DPRPreTrainedModel,
										    DPRPretrainedQuestionEncoder,
										    DPRPretrainedReader,
										    DPRQuestionEncoder,
										    DPRReader,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_dpr import (
										    TF_DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TF_DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TF_DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TFDPRContextEncoder,
										    TFDPRPretrainedContextEncoder,
										    TFDPRPretrainedQuestionEncoder,
										    TFDPRPretrainedReader,
										    TFDPRQuestionEncoder,
										    TFDPRReader,
										)

else:
					import sys

					UpperCamelCase			:					List[Any]         =							_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

