code: def isValidBST(self, root: Optional[TreeNode]) -> bool:
      def isValid(node, low=-math.inf, high=math.inf) -> bool:
          if not node:
              return True
  
          if node.val <= low or node.val >= high:
              return False
  
          return isValid(node.right, node.val, high) and isValid(
              node.left, low, node.val
          )
  
      return isValid(root)
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.isValidBST(root) and returns: isValid, unknown, True, False