input: Write a function to check if one binary tree is a subtree of another binary tree. If the first tree is a subtree of the second tree, return True, else return False. Both trees are represented by their root nodes. If either tree is None, the function should follow the rule that a None tree is not a subtree of any tree.
  
  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
  root1 = Node(26) 
  root1.left = Node(10) 
  root1.right = Node(3) 
  root1.left.left = Node(4) 
  root1.left.right = Node(6) 
  root1.right.right = Node(3) 
  root1.left.left.left = Node(1) 
    
  root2 = Node(10) 
  root2.left = Node(4) 
  root2.right = Node(6) 
  root2.left.left = Node(1)
  
  root3 = Node(30)
  root3.left = Node(17)
  
  assert isSubTree(root1, root2) == True
  assert isSubTree(root1, root3) == False
  assert isSubTree(root2, root1) == False
  assert isSubTree(None, root2) == False
  assert isSubTree(root1, None) == True
output: def isSubTree(T, S):
      if S is None:
          return False
  
      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))