input: 
  def is_subtree(tree1, tree2):
      """ Given two binary trees, check if the first tree is a subtree of the second tree.
      >>> is_subtree(Node(1), Node(1))
      True
      >>> is_subtree(Node(1), Node(2))
      False
      >>> is_subtree(Node(2, left=Node(1)), Node(2, left=Node(1), right=Node(3)))
      True
      """
  
output:     def equals(t1, t2):
          if t1 is None and t2 is None:
              return True
          if t1 is None or t2 is None:
              return False
          return t1.val == t2.val and equals(t1.left, t2.left) and equals(t1.right, t2.right)
  
      def traverse(t1, t2):
          return t1 is not None and (equals(t1, t2) or traverse(t1.left, t2) or traverse(t1.right, t2))
  
      return traverse(tree1, tree2)