code: def isSubtree(
      self, root: Optional[TreeNode], subRoot: Optional[TreeNode]
  ) -> bool:
      if not subRoot:
          return True
      if not root:
          return False
  
      def isSame(
          root: Optional[TreeNode], subRoot: Optional[TreeNode]
      ) -> bool:
          if not root and not subRoot:
              return True
  
          if not root or not subRoot:
              return False
  
          if root.val != subRoot.val:
              return False
  
          return isSame(root.left, subRoot.left) and isSame(
              root.right, subRoot.right
          )
  
      if isSame(root, subRoot):
          return True
      return self.isSubtree(root.left, subRoot) or self.isSubtree(
          root.right, subRoot
      )
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.isSubtree(root, subRoot) and returns: unknown, True, False, unknown, True, True, False, False