code: def build_vocab(self):
      counter = Counter(self.data)
      self._id2unit = VOCAB_PREFIX + list(
          sorted(
              list(counter.keys()),
              key=lambda k: counter[k],
              reverse=True,
          )
      )
      self._unit2id = {w: i for i, w in enumerate(self._id2unit)}
  
file_path: stanza/stanza/models/lemma/vocab.py
imports: from collections import Counter
  from stanza.models.common.vocab import BaseVocab, BaseMultiVocab
  from stanza.models.common.seq2seq_constant import VOCAB_PREFIX
label_desc: Use image node_id 1 for calling the Vocab obj's underlying member method code with example usage: obj.build_vocab() without return types