



'''simple docstring'''


from timeit import timeit







def 				__lowerCamelCase				(   A__    )       ->	int:






   """simple docstring"""
   if number < 0:
      raise ValueError('the value of input must not be negative'    )
   UpperCamelCase					=  0
   while number:
      number &= number - 1
      result += 1
   return result







def 				__lowerCamelCase				(   A__    )       ->	int:






   """simple docstring"""
   if number < 0:
      raise ValueError('the value of input must not be negative'    )
   UpperCamelCase					=  0
   while number:
      if number % 2 == 1:
         result += 1
      number >>= 1
   return result







def 				__lowerCamelCase				(   )       ->	None:






   """simple docstring"""

   def do_benchmark(A__    ) -> None:
      UpperCamelCase					=  'import __main__ as z'
      print(F"""Benchmark when {number = }:"""    )
      print(F"""{get_set_bits_count_using_modulo_operator(A__    ) = }"""    )
      UpperCamelCase					=  timeit('z.get_set_bits_count_using_modulo_operator(25)'    ,						setup=A__    )
      print(F"""timeit() runs in {timing} seconds"""    )
      print(F"""{get_set_bits_count_using_brian_kernighans_algorithm(A__    ) = }"""    )
      UpperCamelCase					=  timeit(
          'z.get_set_bits_count_using_brian_kernighans_algorithm(25)'    ,						setup=A__    ,						)
      print(F"""timeit() runs in {timing} seconds"""    )

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


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   benchmark()








"""simple docstring"""
from typing import Any



def      __lowerCamelCase   (							a_     :		list							)			->      list[Any]:
      if not input_list:
            return []
      __SCREAMING_SNAKE_CASE   :int						=  [input_list.count(a_							) for value in input_list]
      __SCREAMING_SNAKE_CASE   :str						=  max(a_							)  # Gets the maximum count in the input list.
      # Gets values of modes
      return sorted({input_list[i] for i, value in enumerate(a_							) if value == y}							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()