




def 		lowerCAmelCase_ (						lowerCamelCase ):
				return "".join([hex(lowerCamelCase )[2:].zfill(2 ).upper() for byte in list(lowerCamelCase )] )




def 		lowerCAmelCase_ (						lowerCamelCase ):
				# Check data validity, following RFC3548
				# https://www.ietf.org/rfc/rfc3548.txt
				if (len(lowerCamelCase ) % 2) != 0:
								raise ValueError(
								    """Base16 encoded data is invalid:
Data does not have an even number of hex digits.""" )
				# Check the character set - the standard base16 alphabet
				# is uppercase according to RFC3548 section 6
				if not set(lowerCamelCase ) <= set("""0123456789ABCDEF""" ):
								raise ValueError(
								    """Base16 encoded data is invalid:
Data is not uppercase hex or it contains invalid characters.""" )
				# For every two hexadecimal digits (= a byte), turn it into an integer.
				# Then, string the result together into bytes, and return it.
				return bytes(int(data[i] + data[i + 1]						,  16 ) for i in range(0						,  len(lowerCamelCase )						,  2 ) )


if __name__ == "__main__":
							import doctest

							doctest.testmod()






import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin

class 							_UpperCamelCase					(       unittest.TestCase  ,							_A	):






			'''simple docstring'''

			def    lowerCAmelCase__						(							self			:							Tuple   ):
							UpperCamelCase_:				List[Any]						=    load_tool("""text-classification"""   )
							self.tool.setup()
							UpperCamelCase_:				Optional[int]						=    load_tool("""text-classification"""    ,						remote=snake_case_   )

			def    lowerCAmelCase__						(							self			:							Optional[Any]   ):
							UpperCamelCase_:				Union[str, Any]						=    self.tool("""That's quite cool"""    ,						["""positive""", """negative"""]   )
							self.assertEqual(snake_case_    ,						"""positive"""   )

			def    lowerCAmelCase__						(							self			:							int   ):
							UpperCamelCase_:				Tuple						=    self.remote_tool("""That's quite cool"""    ,						["""positive""", """negative"""]   )
							self.assertEqual(snake_case_    ,						"""positive"""   )

			def    lowerCAmelCase__						(							self			:							Optional[int]   ):
							UpperCamelCase_:				int						=    self.tool(text="""That's quite cool"""    ,						labels=["""positive""", """negative"""]   )
							self.assertEqual(snake_case_    ,						"""positive"""   )




			def    lowerCAmelCase__						(							self			:							Tuple   ):
							UpperCamelCase_:				List[Any]						=    self.remote_tool(text="""That's quite cool"""    ,						labels=["""positive""", """negative"""]   )
							self.assertEqual(snake_case_    ,						"""positive"""   )






