class_docstr: Class representing Treap (Cartesian Tree) used to calculate the Incremental KS statistics.
code: def update(cls, node):
      if node is None:
          return
      cls.unlazy(node)
      node.size = 1
      node.height = 0
      node.max_value = node.value
      node.min_value = node.value
  
      if node.left is not None:
          node.size += node.left.size
          node.height += node.left.height
          node.max_value = max(node.max_value, node.left.max_value)
          node.min_value = min(node.min_value, node.left.min_value)
  
      if node.right is not None:
          node.size += node.right.size
          node.height = max(node.height, node.right.height)
          node.max_value = max(node.max_value, node.right.max_value)
          node.min_value = min(node.min_value, node.right.min_value)
  
      node.height += 1
  
imports: from __future__ import annotations
  import math
  import random
  from river import base, stats
label_desc: Use image node_id 4 for calling the Treap obj's underlying member method code with example usage: obj.update(cls, node) without return types