code: private void setupLabel(Key key) {
          int i = 0;
          Key k = new Key();
          for (ValueWritable vw : key.getGrouping()) {
              vw.getLabel().set(inputLabels[i++]);
              k.getGrouping().add(new ValueWritable(vw.getLabel().toString(), vw.getValue()));
          }
          defaultGroupRecord.setKey(k);
  
          valuesLabels = new String[inputLabels.length - i];
          for (int j = 0; j < valuesLabels.length; j++) {
              valuesLabels[j] = inputLabels[i++];
          }
      }
docs: setup label
  @param key key