






__snake_case     :     List[str]       =  {hex(i)[2:]: i for i in range(16)}  # Use [:2] to strip off the leading '0x'







def 						_UpperCamelCase (     UpperCamelCase_							:       str		)	-> int:

						"""simple docstring"""



						lowerCAmelCase__         =    hex_string.strip().lower()
						if not hex_string:
												raise ValueError('Empty string was passed to the function'		)
						lowerCAmelCase__         =    hex_string[0] == '-'
						if is_negative:
												lowerCAmelCase__         =    hex_string[1:]
						if not all(char in hex_table for char in hex_string		):
												raise ValueError('Non-hexadecimal value was passed to the function'		)
						lowerCAmelCase__         =    0
						for char in hex_string:
												lowerCAmelCase__         =    16 * decimal_number + hex_table[char]
						return -decimal_number if is_negative else decimal_number


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

					testmod()






import unittest

from transformers import is_torch_available, load_tool

from .test_tools_common import ToolTesterMixin


if is_torch_available():
   import torch







class __snake_case							(		unittest.TestCase  ,						lowerCamelCase_						):




   def       __a		(       self     :							Dict ):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__     				= load_tool("""speech-to-text""" )
     self.tool.setup()




   def       __a		(       self     :							Tuple ):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__     				= self.tool(torch.ones(30_00 ) )
     self.assertEqual(_lowercase			,      """ you""" )




   def       __a		(       self     :							Any ):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__     				= self.tool(audio=torch.ones(30_00 ) )
     self.assertEqual(_lowercase			,      """ you""" )
