docs: public VocabCache<T> buildMergedVocabulary(@NonNull VocabCache<T> vocabCache, boolean fetchLabels) {
          if (cache == null)
              cache = new AbstractCache.Builder<T>().build();
          for (int t = 0; t < vocabCache.numWords(); t++) {
              String label = vocabCache.wordAtIndex(t);
              if (label == null)
                  continue;
              T element = vocabCache.wordFor(label);
  
              // skip this element if it's a label, and user don't want labels to be merged
              if (!fetchLabels && element.isLabel())
                  continue;
  
              //element.setIndex(t);
              cache.addToken(element);
              cache.addWordToIndex(element.getIndex(), element.getLabel());
  
              // backward compatibility code
              cache.putVocabWord(element.getLabel());
          }
  
          if (cache.numWords() == 0)
              throw new IllegalStateException("Source VocabCache has no indexes available, transfer is impossible");
  
          /*
              Now, when we have transferred vocab, we should roll over iterator, and  gather labels, if any
           */
          log.info("Vocab size before labels: " + cache.numWords());
  
          if (fetchLabels) {
              for (VocabSource<T> source : sources) {
                  SequenceIterator<T> iterator = source.getIterator();
                  iterator.reset();
  
                  while (iterator.hasMoreSequences()) {
                      Sequence<T> sequence = iterator.nextSequence();
                      seqCount.incrementAndGet();
  
                      if (sequence.getSequenceLabels() != null)
                          for (T label : sequence.getSequenceLabels()) {
                              if (!cache.containsWord(label.getLabel())) {
                                  label.markAsLabel(true);
                                  label.setSpecial(true);
  
                                  label.setIndex(cache.numWords());
  
                                  cache.addToken(label);
                                  cache.addWordToIndex(label.getIndex(), label.getLabel());
  
                                  // backward compatibility code
                                  cache.putVocabWord(label.getLabel());
  
                                  //  log.info("Adding label ["+label.getLabel()+"]: " + cache.wordFor(label.getLabel()));
                              } // else log.info("Label ["+label.getLabel()+"] already exists: " + cache.wordFor(label.getLabel()));
                          }
                  }
              }
          }
  
          log.info("Vocab size after labels: " + cache.numWords());
  
          return cache;
      }