class_docstr: Class representing Treap (Cartesian Tree) used to calculate the Incremental KS statistics.
code: def merge(cls, left, right):
      if left is None:
          return right
      if right is None:
          return left
  
      node = None
  
      if left.priority > right.priority:
          cls.unlazy(left)
          left.right = cls.merge(left.right, right)
          node = left
      else:
          cls.unlazy(right)
          right.left = cls.merge(left, right.left)
          node = right
  
      cls.update(node)
  
      return node
  
imports: from __future__ import annotations
  import math
  import random
  from river import base, stats
label_desc: Use image node_id 6 for calling the Treap obj's underlying member method code with example usage: obj.merge(cls, left, right) and returns: node, right, left