input: Write a function to determine the sum of all elements in a given binary tree. If the tree is empty, return 0.
  def sum_tree(root):
      if root is None:
          return 0
  
      return root.val + sum_tree(root.left) + sum_tree(root.right)
  assert sum_tree(None)==0
  assert sum_tree(BinaryTreeNode(3, BinaryTreeNode(1), BinaryTreeNode(2)))==6
  assert sum_tree(BinaryTreeNode(3, BinaryTreeNode(2, BinaryTreeNode(1), None), BinaryTreeNode(3)))==9
  assert sum_tree(BinaryTreeNode(3, None, BinaryTreeNode(1, BinaryTreeNode(2), None)))==6
  assert sum_tree(BinaryTreeNode(1, BinaryTreeNode(2), BinaryTreeNode(3)))==6
output: def sum_tree(root):
      if root is None:
          return 0
  
      return root.val + sum_tree(root.left) + sum_tree(root.right)