code: private long calculateMinOffset(PageWrapper pageWrapper) {
          // Minimum within {PageOffset, All PagePointers' MinLength fields}.
          long min = pageWrapper.getOffset();
          if (!pageWrapper.isIndexPage()) {
              // Leaf pages do not have PagePointers, so the result is their actual offsets.
              return min;
          }
  
          BTreePage page = pageWrapper.getPage();
          int count = page.getCount();
          for (int pos = 0; pos < count; pos++) {
              long ppMinOffset = deserializePointerMinOffset(page.getValueAt(pos));
              min = Math.min(min, ppMinOffset);
          }
  
          return min;
      }
docs: Calculates the Minimum Page Offset for this PageWrapper.
  The Minimum Page Offset is the smallest of this PageWrapper's offset and the MinOffsets of all this PageWrapper's
  direct children.
  
  @param pageWrapper The PageWrapper to calculate the Minimum Page Offset for.
  @return The result.