"""simple docstring"""





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





def     a_					(				_lowerCAmelCase  :			str					):





       '''simple docstring'''

       lowercase__      :		List[Any]          =     hex_string.strip().lower()
       if not hex_string:
              raise ValueError('Empty string was passed to the function'					)
       lowercase__      :		Optional[int]          =     hex_string[0] == '-'
       if is_negative:
              lowercase__      :		Optional[Any]          =     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'					)
       lowercase__      :		str          =     0
       for char in hex_string:
              lowercase__      :		Optional[Any]          =     16 * decimal_number + hex_table[char]
       return -decimal_number if is_negative else decimal_number


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

       testmod()


"""simple docstring"""





from ..utils import DummyObject, requires_backends


class 					UpperCAmelCase_     (   metaclass=_a):
      lowerCamelCase__		:   List[str]			  =  ["torch", "transformers", "k_diffusion"]


      def __init__(       self		,      *a		,      **a							)	-> Dict:
             requires_backends(self		,      ['torch', 'transformers', 'k_diffusion']							)


      @classmethod
      def 		_UpperCAmelCase	(       cls		,      *a		,      **a							)	-> Tuple:
             requires_backends(cls		,      ['torch', 'transformers', 'k_diffusion']							)


      @classmethod
      def 		_UpperCAmelCase	(       cls		,      *a		,      **a							)	-> Any:
             requires_backends(cls		,      ['torch', 'transformers', 'k_diffusion']							)

