code: def build_vocab(self):
      paras = self.data
      counter = Counter()
      for para in paras:
          for unit in para:
              normalized = self.normalize_unit(unit[0])
              counter[normalized] += 1
  
      self._id2unit = [PAD, UNK] + 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/tokenization/vocab.py
imports: from collections import Counter
  import re
  from stanza.models.common.vocab import BaseVocab
  from stanza.models.common.vocab import UNK, PAD
label_desc: Use image node_id 2 for calling the Vocab obj's underlying member method code with example usage: obj.build_vocab() without return types