docs: public static ByteStringRange getBound(RowSet rowSet) {
      // Find min & max keys
      ByteString minKey = null;
      ByteString maxKey = null;
  
      for (ByteString key : rowSet.getRowKeysList()) {
        if (minKey == null || ByteStringComparator.INSTANCE.compare(minKey, key) > 0) {
          minKey = key;
        }
        if (maxKey == null || ByteStringComparator.INSTANCE.compare(maxKey, key) < 0) {
          maxKey = key;
        }
      }
  
      // Convert min & max keys in start & end points for a range
      StartPoint minStartPoint = null;
      EndPoint maxEndPoint = null;
      if (minKey != null) {
        minStartPoint = new StartPoint(minKey, true);
      }
      if (maxKey != null) {
        maxEndPoint = new EndPoint(maxKey, true);
      }
  
      // Expand the range using the RowSet ranges
      for (RowRange rowRange : rowSet.getRowRangesList()) {
        StartPoint currentStartPoint = StartPoint.extract(rowRange);
        if (minStartPoint == null || minStartPoint.compareTo(currentStartPoint) > 0) {
          minStartPoint = currentStartPoint;
        }
  
        EndPoint currentEndpoint = EndPoint.extract(rowRange);
        if (maxEndPoint == null || maxEndPoint.compareTo(currentEndpoint) < 0) {
          maxEndPoint = currentEndpoint;
        }
      }
  
      // Build a range using the endpoints
      ByteStringRange boundingRange = ByteStringRange.unbounded();
      if (minStartPoint != null) {
        if (minStartPoint.isClosed) {
          boundingRange.startClosed(minStartPoint.value);
        } else {
          boundingRange.startOpen(minStartPoint.value);
        }
      }
      if (maxEndPoint != null) {
        if (maxEndPoint.isClosed) {
          boundingRange.endClosed(maxEndPoint.value);
        } else {
          boundingRange.endOpen(maxEndPoint.value);
        }
      }
  
      return boundingRange;
    }