public static boolean isInRange(
      final Bytes location, final Bytes startKeyPath, final Bytes endKeyPath) {
    final MutableBytes path = MutableBytes.create(Bytes32.SIZE * 2);
    path.set(0, location);
    return !location.isEmpty()
        && Arrays.compare(path.toArrayUnsafe(), startKeyPath.toArrayUnsafe()) >= 0
        && Arrays.compare(path.toArrayUnsafe(), endKeyPath.toArrayUnsafe()) <= 0;
  }
Checks if a given location is within a specified range. This method determines whether a given
location (represented as {@link Bytes}) falls within the range defined by a start key path and
an end key path.

@param location The location to check, represented as {@link Bytes}.
@param startKeyPath The start of the range as path, represented as {@link Bytes}.
@param endKeyPath The end of the range as path, represented as {@link Bytes}.
@return {@code true} if the location is within the range (inclusive); {@code false} otherwise.
ethereum/trie/src/main/java/org/hyperledger/besu/ethereum/trie/RangeManager.java