code: private static <K, N extends Node<K, N>> N balanceRight(UpdateContext<? super N> currentContext, N node, N left, N right) {
          if (isRed(right) && isRed(right.right)) {
              N newLeft= node.edit(currentContext, BLACK, left, right.left);
              return right.edit(currentContext, RED, newLeft, right.right.blacken(currentContext));
          }
          else if (isRed(right) && isRed(right.left)) {
              N rightLeft = right.left;
              N newLeft = node.edit(currentContext, BLACK, left, rightLeft.left);
              N newRight = right.edit(currentContext, BLACK, rightLeft.right, right.right);
              return rightLeft.edit(currentContext, RED, newLeft, newRight);
          }
          else {
              return node.edit(currentContext, BLACK, left, right);
          }
      }
docs: TODO: Refactor into RIGHT.balance -method