input: Write a function to check if a given binary tree is a subtree of another binary tree. If it is a subtree, return True; otherwise, return False. If either of the input trees is empty, return False.
  
  
  class Node:
      def __init__(self, data): 
          self.data = data 
          self.left = None
          self.right = None
  
  def isSubTree(T, S):
      if S is None: 
          return True
      if T is None: 
          return False
      if areIdentical(T, S): 
          return True
      return isSubTree(T.left, S) or isSubTree(T.right, S)
  
  def areIdentical(T, S): 
      if T is None and S is None: 
          return True
      if T is None or S is None: 
          return False
      return (T.data == S.data and areIdentical(T.left, S.left) and areIdentical(T.right, S.right))
  
  # Test cases
  assert isSubTree(Node(1), Node(2)) == False
  assert isSubTree(Node(1), None) == False
  assert isSubTree(None, Node(1)) == False
  assert isSubTree(Node(1), Node(1)) == True
  
  # Example trees for testing
  # T1:     1
  #       /   \
  #      2     3
  #     / \   / \
  #    4   5 6   7
  T1 = Node(1)
  T1.left = Node(2)
  T1.right = Node(3)
  T1.left.left = Node(4)
  T1.left.right = Node(5)
  T1.right.left = Node(6)
  T1.right.right = Node(7)
  
  # S1:     2
  #       /   \
  #      4     5
  S1 = Node(2)
  S1.left = Node(4)
  S1.right = Node(5)
  
  assert isSubTree(T1, S1) == True
  
  # S2:     3
  #       /   \
  #      6     7
  S2 = Node(3)
  S2.left = Node(6)
  S2.right = Node(7)
  
  assert isSubTree(T1, S2) == True
  
  # S3:     1
  #       /   \
  #      2     3
  #     / \   / \
  #    4   5 6   8
  S3 = Node(1)
  S3.left = Node(2)
  S3.right = Node(3)
  S3.left.left = Node(4)
  S3.left.right = Node(5)
  S3.right.left = Node(6)
  S3.right.right = Node(8)
  
  assert isSubTree(T1, S3) == False
  
output: def isSubTree(T, S):
      if S is None: 
          return True
      if T is None: 
          return False
      if areIdentical(T, S): 
          return True
      return isSubTree(T.left, S) or isSubTree(T.right, S)
  
  def areIdentical(T, S): 
      if T is None and S is None: 
          return True
      if T is None or S is None: 
          return False
      return (T.data == S.data and areIdentical(T.left, S.left) and areIdentical(T.right, S.right))