docs: private List<AutocompleteResultsModel> collateResultsForAutoCompleteResponse(
              ConcurrentMap<String, List<Tuple<SearchResult, String>>> resultsMap,
              int maxTextLength) {
          SortedMap<Integer, List<AutocompleteResultsModel>> prioritizedResultsMap =
                  getCleanedAndSortedMapResults(resultsMap, maxTextLength);
  
          // Consolidate the results into a single, ordered list of max entries.
          List<AutocompleteResultsModel> results = new ArrayList<>();
          for (List<AutocompleteResultsModel> items : prioritizedResultsMap.values()) {
              results.addAll(items);
              if (results.size() >= maxAutocompleteSearchResults) {
                  break;
              }
          }
          return results.subList(
                  0,
                  results.size() > maxAutocompleteSearchResults
                          ? maxAutocompleteSearchResults
                          : results.size());
      }