

"""simple docstring"""





from __future__ import annotations

class      __a :

			"""simple docstring"""

			def __init__(				self  :       str    ,	lowercase_  :       int    ):
								UpperCamelCase__		:     Union[str, Any]								=value
								UpperCamelCase__		:     Node | None								=None
								UpperCamelCase__		:     Node | None								=None



class      __a :

			"""simple docstring"""

			SCREAMING_SNAKE_CASE_      =    42






			def __init__(				self  :       List[Any]    ):
								UpperCamelCase__		:     int								=0






			def  _lowerCAmelCase      (				self  :       int    ,	lowercase_  :       Node | None    ,	lowercase_  :       int    ):
								if node is None:
													return

								if path_sum == self.target:
													self.paths += 1

								if node.left:
													self.depth_first_search(node.left    ,	path_sum + node.left.value    )
								if node.right:
													self.depth_first_search(node.right    ,	path_sum + node.right.value    )






			def  _lowerCAmelCase      (				self  :       int    ,	lowercase_  :       Node | None    ,	lowercase_  :       int | None = None    ):
								if node is None:
													return 0
								if target is not None:
													UpperCamelCase__		:     List[str]								=target

								self.depth_first_search(lowercase_    ,	node.value    )
								self.path_sum(node.left    )
								self.path_sum(node.right    )

								return self.paths


if __name__ == "__main__":
				import doctest

				doctest.testmod()





"""simple docstring"""





def 							_lowerCAmelCase   (    UpperCAmelCase  :				int					):


					'''simple docstring'''






					if not isinstance(UpperCAmelCase   ,				UpperCAmelCase					):
										raise ValueError('''double_factorial() only accepts integral values'''					)
					if n < 0:
										raise ValueError('''double_factorial() not defined for negative values'''					)
					return 1 if n <= 1 else n * double_factorial(n - 2					)


if __name__ == "__main__":
				import doctest

				doctest.testmod()


