docs: def avl_release_kids(node):
      """
      splits a node from its kids maintaining parent pointers
      """
      left, right = node.left, node.right
      if left is not None:
          # assert left.parent is node
          left.parent = None
      if right is not None:
          # assert right.parent is node
          right.parent = None
      node.balance = 0
      node.left = None
      node.right = None
      return node, left, right