code: def build_vocab(self, *args, **kwargs):
      sources = []
      for arg in args:
          if isinstance(arg, textdata.Dataset):
              sources += [
                  getattr(arg, name)
                  for name, field in arg.fields.items()
                  if field is self
              ]
          else:
              sources.append(arg)
  
      counter = Counter()
      for data in sources:
          # data is the return value of preprocess().
          for sentence in data:
              for word_chars in sentence:
                  # update treats word as an iterable, so this will add all
                  # the characters from the word, not the word itself.
                  counter.update(word_chars)
      specials = [self.unk_token, self.pad_token]
  
      self.vocab = vocab.Vocab(counter, specials=specials, **kwargs)
  
file_path: pytext/pytext/fields/char_field.py
imports: import copy
  from collections import Counter
  from typing import List
  import torch
  from pytext.common.constants import VocabMeta
  from pytext.legacy import data, vocab
  from pytext.utils.data import no_tokenize
  from .field import VocabUsingField
label_desc: Use image node_id 2 for calling the CharFeatureField obj's underlying member method code with example usage: obj.build_vocab() without return types