input: def is_subtree(T: Node, S: Node) -> bool:
      """ Given two binary trees T and S, check if S is a subtree of T.
      >>> is_subtree(None, None)
      True
      >>> is_subtree(Node(1), None)
      True
      >>> is_subtree(None, Node(1))
      False
      >>> T = Node(2)
      T.left = Node(1)
      T.right = Node(3)
      S = Node(2)
      S.left = Node(1)
      S.right = Node(3)
      is_subtree(T, S)
      True
      """
output:     
      if S is None:
          return True
      if T is None:
          return False
      
      def is_identical(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 is_identical(t1.left, t2.left) and is_identical(t1.right, t2.right)
      
      if is_identical(T, S):
          return True
      
      return is_subtree(T.left, S) or is_subtree(T.right, S)
  