import hashlib
from typing import Union
def    __magic_name__(	__UpperCAmelCase		)    ->     Tuple:



      '''simple docstring'''

      if isinstance(lowercase__			,    lowercase__		):
            # Data already in bytes, returns as it as
            return hash_data
      elif isinstance(lowercase__			,    lowercase__		):
            # We keep the data as it as for it ot be later encoded to UTF-8
            # However replace `\\` with `/` for Windows compatibility
            _lowerCamelCase           =					hash_data.replace('''\\'''			,    '''/'''		)
      elif isinstance(lowercase__			,    lowercase__		):
            _lowerCamelCase           =					str(lowercase__		)
      else:
            # If data is not of the required type, raise error
            raise InvalidKeyError(lowercase__		)

      return hash_data.encode('''utf-8'''		)



class 			UpperCamelCase					(			_A			):

     '''simple docstring'''

     def __init__(       self					,					A_    )			->					str:






           """simple docstring"""
           _lowerCamelCase           =					'''\nFAILURE TO GENERATE DATASET: Invalid key type detected'''
           _lowerCamelCase           =					F'\nFound Key {hash_data} of type {type(__SCREAMING_SNAKE_CASE    )}'
           _lowerCamelCase           =					'''\nKeys should be either str, int or bytes type'''
           super().__init__(F'{self.prefix}{self.err_msg}{self.suffix}'    )





class 			UpperCamelCase					(			_A			):

     '''simple docstring'''

     def __init__(       self					,					A_					,					A_					,					A_=""    )			->					str:






           """simple docstring"""
           _lowerCamelCase           =					key
           _lowerCamelCase           =					duplicate_key_indices
           _lowerCamelCase           =					fix_msg
           _lowerCamelCase           =					'''Found multiple examples generated with the same key'''
           if len(__SCREAMING_SNAKE_CASE    ) <= 20:
                 _lowerCamelCase           =					F'\nThe examples at index {", ".join(__SCREAMING_SNAKE_CASE    )} have the key {key}'
           else:
                 _lowerCamelCase           =					F'\nThe examples at index {", ".join(duplicate_key_indices[:20]    )}... ({len(__SCREAMING_SNAKE_CASE    ) - 20} more) have the key {key}'
           _lowerCamelCase           =					'''\n''' + fix_msg if fix_msg else ''''''
           super().__init__(F'{self.prefix}{self.err_msg}{self.suffix}'    )





class 			UpperCamelCase					:

     '''simple docstring'''

     def __init__(       self					,					A_    )			->					str:






           """simple docstring"""
           _lowerCamelCase           =					hashlib.mda(_as_bytes(__SCREAMING_SNAKE_CASE    )    )





     def 		UpperCamelCase_    (       self					,					A_    )			->					Union[str, Any]:






           """simple docstring"""
           _lowerCamelCase           =					self._split_mda.copy()
           _lowerCamelCase           =					_as_bytes(__SCREAMING_SNAKE_CASE    )
           mda.update(__SCREAMING_SNAKE_CASE    )
           # Convert to integer with hexadecimal conversion
           return int(mda.hexdigest()					,					16    )


"""simple docstring"""




from __future__ import annotations
def   __SCREAMING_SNAKE_CASE		(		lowercase__     ,				lowercase__ ):
					"""simple docstring"""
					A     =   {}
					for index, val in enumerate(lowercase__ ):
										A     =   target - val
										if compl in chk_map:
															return [chk_map[compl], index]
										A     =   index
					return []


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	print(f"""{two_sum([2, 7, 11, 15], 9) = }""")





