from timeit import timeit
def  snake_case						(__lowercase						)	->	int:

						'''simple docstring'''



						if number < 0:
												raise ValueError("the value of input must not be negative"						)
						_snake_case						:					Dict    =   0
						while number:
												number &= number - 1
												result += 1
						return result
def  snake_case						(__lowercase						)	->	int:

						'''simple docstring'''



						if number < 0:
												raise ValueError("the value of input must not be negative"						)
						_snake_case						:					Dict    =   0
						while number:
												if number % 2 == 1:
																		result += 1
												number >>= 1
						return result
def  snake_case						()	->	None:

						'''simple docstring'''



						def do_benchmark(__lowercase						) -> None:
												_snake_case						:					Dict    =   "import __main__ as z"
												print(F"""Benchmark when {number = }:"""						)
												print(F"""{get_set_bits_count_using_modulo_operator(__lowercase						) = }"""						)
												_snake_case						:					Union[str, Any]    =   timeit("z.get_set_bits_count_using_modulo_operator(25)" ,      setup=__lowercase						)
												print(F"""timeit() runs in {timing} seconds"""						)
												print(F"""{get_set_bits_count_using_brian_kernighans_algorithm(__lowercase						) = }"""						)
												_snake_case						:					Tuple    =   timeit(
												    "z.get_set_bits_count_using_brian_kernighans_algorithm(25)" ,      setup=__lowercase ,      )
												print(F"""timeit() runs in {timing} seconds"""						)

						for number in (25, 37, 58, 0):
												do_benchmark(__lowercase						)
												print()


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				benchmark()
def  snake_case						(__lowercase						)	->	bool:

						'''simple docstring'''



						_snake_case						:					Dict    =   0
						for ch in input_str:
												_snake_case						:					int    =   ord(__lowercase						)
												_snake_case						:					List[Any]    =   pow(2 ,      __lowercase						)

												# If we already turned on bit for current character's unicode
												if bitmap >> ch_unicode & 1 == 1:
																		return False
												bitmap |= ch_bit_index_on
						return True


if __name__ == "__main__":
				import doctest

				doctest.testmod()