input: Write a function to check if two binary trees are similar based on their structure and values. If both trees are identical in terms of structure and node values, return True; otherwise, return False.
  
  The TreeNode class is defined as follows:
  
  class TreeNode:
      def __init__(self, x):
          self.val = x
          self.left = None
          self.right = None
  
  
  Function header:
  
  def are_similar(root1, root2):
  
  
  Examples:
  
  # Constructed binary trees
  #       1                1
  #      / \              / \
  #     2   3            2   3
  assert are_similar(TreeNode(1, TreeNode(2), TreeNode(3)), TreeNode(1, TreeNode(2), TreeNode(3))) == True
  
  #       1                1
  #      / \              / \
  #     2   3            3   2
  assert are_similar(TreeNode(1, TreeNode(2), TreeNode(3)), TreeNode(1, TreeNode(3), TreeNode(2))) == False
  
  #     1                  1
  #    / \                / 
  #   2   3              2   
  #                     /
  #                    3
  assert are_similar(TreeNode(1, TreeNode(2), TreeNode(3)), TreeNode(1, TreeNode(2, TreeNode(3), None))) == False
  
output: def are_similar(root1, root2):
      if not root1 and not root2:
          return True
      if not root1 or not root2:
          return False
      if root1.val != root2.val:
          return False
      return are_similar(root1.left, root2.left) and are_similar(root1.right, root2.right)