docs: @SuppressWarnings("PMD.UnusedLocalVariable")
    public static <T> int size(Iterable<T> iter) {
      if (iter instanceof ArrayTagSet) {
        return ((ArrayTagSet) iter).size();
      } else if (iter instanceof Collection<?>) {
        return ((Collection<?>) iter).size();
      } else {
        int size = 0;
        for (T v : iter) {
          ++size;
        }
        return size;
      }
    }