
__a        = {
    '0000': '0',
    '0001': '1',
    '0010': '2',
    '0011': '3',
    '0100': '4',
    '0101': '5',
    '0110': '6',
    '0111': '7',
    '1000': '8',
    '1001': '9',
    '1010': 'a',
    '1011': 'b',
    '1100': 'c',
    '1101': 'd',
    '1110': 'e',
    '1111': 'f',
}




def     a						(							snake_case__: str ):


				'''simple docstring'''
				lowercase_					  = str(snake_case__ ).strip()

				# Exceptions
				if not binary_str:
								raise ValueError('''Empty string was passed to the function''' )
				lowercase_					  = binary_str[0] == '''-'''
				lowercase_					  = binary_str[1:] if is_negative else binary_str
				if not all(char in '''01''' for char in binary_str ):
								raise ValueError('''Non-binary value was passed to the function''' )

				lowercase_					  = (
				    '''0''' * (4 * (divmod(len(snake_case__ )						,       4 )[0] + 1) - len(snake_case__ )) + binary_str
				)

				lowercase_					  = []
				for x in range(0						,       len(snake_case__ )						,       4 ):
								hexadecimal.append(BITS_TO_HEX[binary_str[x : x + 4]] )
				lowercase_					  = '''0x''' + ''''''.join(snake_case__ )

				return "-" + hexadecimal_str if is_negative else hexadecimal_str


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

						testmod()






from typing import TYPE_CHECKING

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


__a        = {
    '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        = [
						    '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        = _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




