input: Write a function to determine the sum of all elements in a given binary tree. If the root is None, return 0. Otherwise, recursively sum up the value of the root and the sums of its left and right subtrees.
  
  assert sum_tree(None)==0
  
  class TreeNode:
      def __init__(self, val=0, left=None, right=None):
          self.val = val
          self.left = left
          self.right = right
  
  root = TreeNode(1)
  root.left = TreeNode(2)
  root.right = TreeNode(3)
  root.left.left = TreeNode(4)
  root.left.right = TreeNode(5)
  
  assert sum_tree(root)==15
output: def sum_tree(root):
      if root is None:
          return 0
      return root.val + sum_tree(root.left) + sum_tree(root.right)