from __future__ import annotations

from dataclasses import dataclass




@dataclass
class   _UpperCamelCase :


			"""simple docstring"""






			__a    :					float
			__a    :					TreeNode | None     					=		None
			__a    :					TreeNode | None     					=		None





def 							UpperCAmelCase		(       lowercase				):







				"""simple docstring"""



				def is_valid_tree(lowercase				) -> bool:
								if node is None:
												return True

								if not isinstance(lowercase				,     lowercase				):
												return False

								try:
												float(node.data				)
								except (TypeError, ValueError):
												return False

								return is_valid_tree(node.left				) and is_valid_tree(node.right				)

				if not is_valid_tree(lowercase				):
								raise ValueError(
								    '''Each node should be type of TreeNode and data should be float.'''				)

				def is_binary_search_tree_recursive_check(
				    lowercase				,     lowercase				,     lowercase				) -> bool:

								if node is None:
												return True

								return (
								    left_bound < node.data < right_bound
								    and is_binary_search_tree_recursive_check(node.left				,     lowercase				,     node.data				)
								    and is_binary_search_tree_recursive_check(
								        node.right				,     node.data				,     lowercase				)
								)

				return is_binary_search_tree_recursive_check(lowercase				,     -float('''inf'''				)				,     float('''inf'''				)				)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
def 							UpperCAmelCase		(       lowercase				):







				"""simple docstring"""



				if not isinstance(lowercase				,     lowercase				):
								raise ValueError('''Input must be an integer'''				)
				if input_num <= 0:
								raise ValueError('''Input must be positive'''				)
				return sum(
				    divisor for divisor in range(1				,     input_num // 2 + 1				) if input_num % divisor == 0				)


if __name__ == "__main__":
		import doctest

		doctest.testmod()