"""simple docstring"""






def 						a_		(      lowerCamelCase      ,    lowerCamelCase      ,    lowerCamelCase=False ):

				if isinstance(lowerCamelCase      ,    lowerCamelCase ) and isinstance(lowerCamelCase      ,    lowerCamelCase ):
								UpperCAmelCase__    =							len(set_a.intersection(lowerCamelCase ) )

								if alternative_union:
												UpperCAmelCase__    =							len(lowerCamelCase ) + len(lowerCamelCase )
								else:
												UpperCAmelCase__    =							len(set_a.union(lowerCamelCase ) )

								return intersection / union

				if isinstance(lowerCamelCase      ,    (list, tuple) ) and isinstance(lowerCamelCase      ,    (list, tuple) ):
								UpperCAmelCase__    =							[element for element in set_a if element in set_b]

								if alternative_union:
												UpperCAmelCase__    =							len(lowerCamelCase ) + len(lowerCamelCase )
												return len(lowerCamelCase ) / union
								else:
												UpperCAmelCase__    =							set_a + [element for element in set_b if element not in set_a]
												return len(lowerCamelCase ) / len(lowerCamelCase )

								return len(lowerCamelCase ) / len(lowerCamelCase )
				return None


if __name__ == "__main__":
						lowerCAmelCase__						:						Union[str, Any]		  =			{'a', 'b', 'c', 'd', 'e'}
						lowerCAmelCase__						:						List[str]		  =			{'c', 'd', 'e', 'f', 'h', 'i'}
						print(jaccard_similarity(set_a, set_b))




"""simple docstring"""






import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
						import ctypes
						import msvcrt  # noqa
						class        snake_case (				ctypes.Structure       ):




											"""simple docstring"""

											snake_case__       					=				[("size", ctypes.c_int), ("visible", ctypes.c_byte)]



def 						a_		(      ):
				if os.name == "nt":
								UpperCAmelCase__    =							CursorInfo()
								UpperCAmelCase__    =							ctypes.windll.kernelaa.GetStdHandle(-1_1 )
								ctypes.windll.kernelaa.GetConsoleCursorInfo(lowerCamelCase      ,    ctypes.byref(lowerCamelCase ) )
								UpperCAmelCase__    =							False
								ctypes.windll.kernelaa.SetConsoleCursorInfo(lowerCamelCase      ,    ctypes.byref(lowerCamelCase ) )
				elif os.name == "posix":
								sys.stdout.write('\033[?25l' )
								sys.stdout.flush()



def 						a_		(      ):
				if os.name == "nt":
								UpperCAmelCase__    =							CursorInfo()
								UpperCAmelCase__    =							ctypes.windll.kernelaa.GetStdHandle(-1_1 )
								ctypes.windll.kernelaa.GetConsoleCursorInfo(lowerCamelCase      ,    ctypes.byref(lowerCamelCase ) )
								UpperCAmelCase__    =							True
								ctypes.windll.kernelaa.SetConsoleCursorInfo(lowerCamelCase      ,    ctypes.byref(lowerCamelCase ) )
				elif os.name == "posix":
								sys.stdout.write('\033[?25h' )
								sys.stdout.flush()







@contextmanager
def 						a_		(      ):
				try:
								hide_cursor()
								yield
				finally:
								show_cursor()



