input: Write a function to determine the sum of all elements in a given binary tree. If the tree is empty, return 0. Otherwise, recursively sum the value of the root node plus the sums of the left and right subtrees.
  assert sum_tree(None)==0
  assert sum_tree(TreeNode(1, TreeNode(2), TreeNode(3)))==6
  assert sum_tree(TreeNode(5, TreeNode(3, TreeNode(2)), TreeNode(8, None, TreeNode(1))))==19
  assert sum_tree(TreeNode(0, TreeNode(-1, TreeNode(-2)), TreeNode(1, None, TreeNode(2))))==0
output: def sum_tree(root):
      if root is None:
          return 0
      return root.val + sum_tree(root.left) + sum_tree(root.right)