docs: public void updateIndices(ApiType oldObj, ApiType newObj, String key) {
      // if we got an old object, we need to remove it before we can add
      // it again.
      if (oldObj != null) {
        deleteFromIndices(oldObj, key);
      }
      for (Map.Entry<String, Function<ApiType, List<String>>> indexEntry : indexers.entrySet()) {
        String indexName = indexEntry.getKey();
        Function<ApiType, List<String>> indexFunc = indexEntry.getValue();
        List<String> indexValues = indexFunc.apply(newObj);
        if (io.kubernetes.client.util.common.Collections.isEmptyCollection(indexValues)) {
          continue;
        }
  
        Map<String, Set<String>> index =
            this.indices.computeIfAbsent(indexName, k -> new HashMap<>());
        for (String indexValue : indexValues) {
          Set<String> indexSet = index.computeIfAbsent(indexValue, k -> new HashSet<>());
          indexSet.add(key);
        }
      }
    }