docs: private void cleanUpLabels() {
          int id = 0;
          for (Iterator<Label> i = labels.iterator(); i.hasNext();) {
              Label label = i.next();
              if (label.isEmpty()) {
                  i.remove();
              } else {
                  label.compact();
                  label.id = id++;
              }
          }
      }