




"""simple docstring"""







def 						snake_case__       (					_lowerCamelCase				)			->bool:






		"""simple docstring"""


		__lowercase				:		set[int]												=				set()
		# To detect a back edge, keep track of vertices currently in the recursion stack
		__lowercase				:		set[int]												=				set()
		return any(
		    node not in visited and depth_first_search(_lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase				)
		    for node in graph				)

def 						snake_case__       (					_lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase				)			->bool:






		"""simple docstring"""


		visited.add(_lowerCamelCase				)
		rec_stk.add(_lowerCamelCase				)

		for node in graph[vertex]:
				if node not in visited:
						if depth_first_search(_lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase				):
								return True
				elif node in rec_stk:
						return True

    # The node needs to be removed from recursion stack before function ends
		rec_stk.remove(_lowerCamelCase				)
		return False


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

						testmod()







"""simple docstring"""







def 						snake_case__       (					_lowerCamelCase				)			->int:






		"""simple docstring"""


		if a < 0:
				raise ValueError("Input value must be a positive integer"				)
		elif isinstance(_lowerCamelCase,  _lowerCamelCase				):
				raise TypeError("Input value must be a 'int' type"				)
		return bin(_lowerCamelCase				).count("1"				)


if __name__ == "__main__":
						import doctest

						doctest.testmod()
