code: private UpdateResult insert(V item, Node node) {
          UpdateResult result;
          if (node == null) {
              // This is the right location for the item, but there's no node. Create one.
              result = new UpdateResult();
              result.node = new Node(item);
              this.size++;
              this.modCount++;
          } else {
              long itemKey = item.key();
              long nodeKey = node.item.key();
              if (itemKey < nodeKey) {
                  // New item is smaller than the current node's item; move to the left child.
                  result = insert(item, node.left);
                  node.left = result.node;
              } else if (itemKey > nodeKey) {
                  // New item is larger than the current node's item; move to the right child.
                  result = insert(item, node.right);
                  node.right = result.node;
              } else {
                  // Node already exists. Save the existing node's item and return it.
                  result = new UpdateResult();
                  result.updatedItem = node.item;
                  node.item = item;
              }
  
              // Rebalance the sub-tree, if necessary.
              result.node = balance(node);
          }
  
          return result;
      }
docs: Inserts an item into a subtree.
  
  @param item The item to insert.
  @param node The node at the root of the current subtree.
  @return The new root of the subtree.