input: Write a function to compute the sum of all nodes in a binary tree.
  assert sum_tree(TreeNode(1, TreeNode(2), TreeNode(3))) == 6
  assert sum_tree(TreeNode(4, TreeNode(2, TreeNode(1), TreeNode(3)), TreeNode(5))) == 15
  assert sum_tree(None) == 0
output: def sum_tree(root):
      if root is None:
          return 0
      return root.val + sum_tree(root.left) + sum_tree(root.right)