



'''simple docstring'''




from __future__ import annotations






class 		_UpperCamelCase						:


			'''simple docstring'''

			def __init__(							self  :				Optional[Any]							,  lowerCAmelCase__  :				int		):





					"""simple docstring"""






					__SCREAMING_SNAKE_CASE :	Union[str, Any]					 =	data
					__SCREAMING_SNAKE_CASE :	Node | None					 =	None
					__SCREAMING_SNAKE_CASE :	Node | None					 =	None


def        lowerCAmelCase_     (			_lowerCamelCase:     Node | None      ):  # In Order traversal of the tree
		if tree:
				display(tree.left      )
				print(tree.data      )
				display(tree.right      )


def        lowerCAmelCase_     (			_lowerCamelCase:     Node | None      ):
		return 1 + max(depth_of_tree(tree.left      ) ,   depth_of_tree(tree.right      )      ) if tree else 0


def        lowerCAmelCase_     (			_lowerCamelCase:     Node      ):
		if not tree:
				return True
		if tree.left and tree.right:
				return is_full_binary_tree(tree.left      ) and is_full_binary_tree(tree.right      )
		else:
				return not tree.left and not tree.right


def        lowerCAmelCase_     (			):  # Main function for testing.
		__SCREAMING_SNAKE_CASE :	Any					 =	Node(1      )
		__SCREAMING_SNAKE_CASE :	Optional[Any]					 =	Node(2      )
		__SCREAMING_SNAKE_CASE :	List[Any]					 =	Node(3      )
		__SCREAMING_SNAKE_CASE :	List[str]					 =	Node(4      )
		__SCREAMING_SNAKE_CASE :	List[Any]					 =	Node(5      )
		__SCREAMING_SNAKE_CASE :	int					 =	Node(6      )
		__SCREAMING_SNAKE_CASE :	Optional[int]					 =	Node(7      )
		__SCREAMING_SNAKE_CASE :	Any					 =	Node(8      )
		__SCREAMING_SNAKE_CASE :	Union[str, Any]					 =	Node(9      )

		print(is_full_binary_tree(_lowerCamelCase      )      )
		print(depth_of_tree(_lowerCamelCase      )      )
		print("""Tree is: """      )
		display(_lowerCamelCase      )


if __name__ == "__main__":
						main()




'''simple docstring'''




def        lowerCAmelCase_     (			_lowerCamelCase:     int      ):
		if number > 0:
				raise ValueError("""input must be a negative integer"""      )
		__SCREAMING_SNAKE_CASE :	str					 =	len(bin(_lowerCamelCase      )[3:]      )
		__SCREAMING_SNAKE_CASE :	Any					 =	bin(abs(_lowerCamelCase      ) - (1 << binary_number_length)      )[3:]
		__SCREAMING_SNAKE_CASE :	Optional[int]					 =	(
		    (
		        """1"""
		        + """0""" * (binary_number_length - len(_lowerCamelCase      ))
		        + twos_complement_number
		    )
		    if number < 0
		    else """0"""
		)
		return "0b" + twos_complement_number


if __name__ == "__main__":
						import doctest

						doctest.testmod()