docs: public static Map<Integer,List<String>> inferCategories(RecordReader recordReader,int[] columnIndices) {
          if(columnIndices == null || columnIndices.length < 1) {
              return Collections.emptyMap();
          }
  
          Map<Integer,List<String>> categoryMap = new HashMap<>();
          Map<Integer,Set<String>> categories = new HashMap<>();
          for(int i = 0; i < columnIndices.length; i++) {
              categoryMap.put(columnIndices[i],new ArrayList<String>());
              categories.put(columnIndices[i],new HashSet<String>());
          }
          while(recordReader.hasNext()) {
              List<Writable> next = recordReader.next();
              for(int i = 0; i < columnIndices.length; i++) {
                  if(columnIndices[i] >= next.size()) {
                      log.warn("Filtering out example: Invalid length of columns");
                      continue;
                  }
  
                  categories.get(columnIndices[i]).add(next.get(columnIndices[i]).toString());
              }
  
          }
  
          for(int i = 0; i < columnIndices.length; i++) {
              categoryMap.get(columnIndices[i]).addAll(categories.get(columnIndices[i]));
  
              //Sort categories alphabetically - HashSet and RecordReader orders are not deterministic in general
              Collections.sort(categoryMap.get(columnIndices[i]));
          }
  
          return categoryMap;
      }