input: Write a function to compare two binary trees and determine if they are similar. Two binary trees are considered similar if they have the same structure and corresponding nodes contain the same values. If both trees are empty, they are considered similar. If one tree is empty and the other is not, they are not similar. The function should return True if the two trees are similar, else return False.
  assert are_similar(None, None) == True
  assert are_similar(TreeNode(5), None) == False
  assert are_similar(None, TreeNode(5)) == False
  root1 = TreeNode(5)
  root1.left = TreeNode(3)
  root1.right = TreeNode(7)
  root2 = TreeNode(5)
  root2.left = TreeNode(3)
  root2.right = TreeNode(7)
  assert are_similar(root1, root2) == True
  root3 = TreeNode(5)
  root3.left = TreeNode(4)
  root3.right = TreeNode(7)
  assert are_similar(root1, root3) == False
output: def are_similar(root1, root2):
      if root1 is None and root2 is None:
          return True
      if root1 is None or root2 is None:
          return False
      if root1.val != root2.val:
          return False
      return are_similar(root1.left, root2.left) and are_similar(root1.right, root2.right)