input: 
  def are_similar(root1: TreeNode, root2: TreeNode) -> bool:
      """
      This function compares two binary trees to check if they are similar. Two binary trees are considered similar if they have the same structure and the same values at corresponding nodes.
      
      >>> are_similar(None, None)
      True
      >>> are_similar(TreeNode(1), None)
      False
      >>> are_similar(TreeNode(1), TreeNode(1))
      True
      >>> are_similar(TreeNode(1, TreeNode(2), TreeNode(3)), TreeNode(1, TreeNode(2), TreeNode(3)))
      True
      >>> are_similar(TreeNode(1, TreeNode(2), TreeNode(3)), TreeNode(1, TreeNode(3), TreeNode(2)))
      False
      """
      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)
  
output:     
      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)
  