code: @VisibleForTesting
    void rangeSetToByteStringRange(RangeSet<RowKeyWrapper> guavaRangeSet, Query query) {
  
      for (Range<RowKeyWrapper> guavaRange : guavaRangeSet.asRanges()) {
        // Is it a point?
        if (guavaRange.hasLowerBound() && guavaRange.lowerBoundType() == BoundType.CLOSED
            && guavaRange.hasUpperBound() && guavaRange.upperBoundType() == BoundType.CLOSED
            && guavaRange.lowerEndpoint().equals(guavaRange.upperEndpoint())) {
  
          query.rowKey(guavaRange.lowerEndpoint().getKey());
        } else {
          ByteStringRange byteRange = ByteStringRange.unbounded();
  
          // Handle start key
          if (guavaRange.hasLowerBound()) {
            switch (guavaRange.lowerBoundType()) {
              case CLOSED:
                byteRange.startClosed(guavaRange.lowerEndpoint().getKey());
                break;
              case OPEN:
                byteRange.startOpen(guavaRange.lowerEndpoint().getKey());
                break;
              default:
                throw new IllegalArgumentException("Unexpected lower bound type: "
                    + guavaRange.lowerBoundType());
            }
          }
  
          // handle end key
          if (guavaRange.hasUpperBound()) {
            switch (guavaRange.upperBoundType()) {
              case CLOSED:
                byteRange.endClosed(guavaRange.upperEndpoint().getKey());
                break;
              case OPEN:
                byteRange.endOpen(guavaRange.upperEndpoint().getKey());
                break;
              default:
                throw new IllegalArgumentException("Unexpected upper bound type: " +
                    guavaRange.upperBoundType());
            }
          }
          query.range(byteRange);
        }
      }
    }
docs: Convert guava's {@link RangeSet} to Bigtable's {@link ByteStringRange}. Please note that this will convert
  boundless ranges into unset key cases.