docs: @VisibleForTesting
    boolean contains(TokenRange range, Token token, boolean isStart) {
      if (range.isEmpty()) {
        return false;
      }
      if (range.getEnd().equals(minToken)) {
        if (range.getStart().equals(minToken)) { // ]min, min] = full ring, contains everything
          return true;
        } else if (token.equals(minToken)) {
          return !isStart;
        } else {
          return isStart
              ? token.compareTo(range.getStart()) >= 0
              : token.compareTo(range.getStart()) > 0;
        }
      } else {
        boolean isAfterStart =
            isStart ? token.compareTo(range.getStart()) >= 0 : token.compareTo(range.getStart()) > 0;
        boolean isBeforeEnd =
            isStart ? token.compareTo(range.getEnd()) < 0 : token.compareTo(range.getEnd()) <= 0;
        return range.isWrappedAround()
            ? isAfterStart || isBeforeEnd //  ####]----]####
            : isAfterStart && isBeforeEnd; // ----]####]----
      }
    }