input: 
  def isSubTree(T, S):
      """
      Given two binary trees, check if the first tree is a subtree of the second tree.
      
      Example:
      >>> class Node:
      ...     def __init__(self, data):
      ...         self.data = data
      ...         self.left = None
      ...         self.right = None
      >>> T = Node(26)
      >>> T.left = Node(10)
      >>> T.right = Node(3)
      >>> T.left.left = Node(4)
      >>> T.left.right = Node(6)
      >>> T.right.right = Node(3)
      >>> S = Node(10)
      >>> S.left = Node(4)
      >>> S.right = Node(6)
      >>> isSubTree(T, S)
      True
      >>> S = Node(3)
      >>> S.right = Node(3)
      >>> S.right.right = Node(3)
      >>> isSubTree(T, S)
      False
      """
  
output:     def is_identical(root1, root2):
          if not root1 and not root2:
              return True
          if not root1 or not root2:
              return False
          return (root1.data == root2.data and
                  is_identical(root1.left, root2.left) and
                  is_identical(root1.right, root2.right))
  
      def check_subtree(T, S):
          if not S:
              return True
          if not T:
              return False
          if is_identical(T, S):
              return True
          return check_subtree(T.left, S) or check_subtree(T.right, S)
  
      return check_subtree(T, S)