code: def total_unival_trees(node):
      left_value = None
      is_left_unival_tree = True
      right_value = None
      is_right_unival_tree = True
      unival_trees = 0
  
      # count left unival trees and save the value
      if node.left is not None:
          left_result = total_unival_trees(node.left)
          unival_trees += left_result[0]
          is_left_unival_tree = left_result[1]
          left_value = node.left.val
  
      # count right unival trees and save the value
      if node.right is not None:
          right_result = total_unival_trees(node.right)
          unival_trees += right_result[0]
          is_right_unival_tree = right_result[1]
          right_value = node.right.val
  
      # check if this root is an unival tree
      is_this_unival_tree = (
          is_left_unival_tree
          and is_right_unival_tree
          and (left_value == right_value)
      )
      unival_trees += is_this_unival_tree
  
      return (unival_trees, is_this_unival_tree)
  
label_desc: Use image node_id 2 for calling a global function with example usage: total_unival_trees(node) and returns: unival_trees,  is_this_unival_tree