input: def isSubTree(T, S): 
      """Given two binary trees `T` and `S`, check if `S` is a subtree of `T`.
      >>> T1 = Node(1)
      >>> T1.left = Node(2)
      >>> T1.right = Node(3)
      >>> T1.left.left = Node(4)
      >>> T1.left.right = Node(5)
      >>> S1 = Node(2)
      >>> S1.left = Node(4)
      >>> S1.right = Node(5)
      >>> isSubTree(T1, S1)
      True
      >>> T2 = Node(1)
      >>> T2.left = Node(2)
      >>> T2.right = Node(3)
      >>> S2 = Node(1)
      >>> S2.left = Node(2)
      >>> S2.right = Node(4)
      >>> isSubTree(T2, S2)
      False
      """
output:     
      def is_same_tree(t1, t2):
          if not t1 and not t2:
              return True
          if not t1 or not t2:
              return False
          return t1.val == t2.val and is_same_tree(t1.left, t2.left) and is_same_tree(t1.right, t2.right)
  
      if not S:
          return True
      if not T:
          return False
      if is_same_tree(T, S):
          return True
      return isSubTree(T.left, S) or isSubTree(T.right, S)
  