class_docstr: Helper class for aggregating and building `Vocabulary` objects.
class_docstr_tok: ["Helper","class","for","aggregating","and","building","`","Vocabulary","`","objects","."]
docstr: Count a value or nested container of values in the vocabulary.
docstr_tok: ["Count","a","value","or","nested","container","of","values","in","the","vocabulary","."]
code: def add_all(self, values) -> None:
      """Count a value or nested container of values in the vocabulary."""
      if should_iter(values):
          for value in values:
              self.add_all(value)
      else:
          # Don't add None or empty
          if values not in [None, ""]:
              self.add(values)
  
imports: import itertools
  from collections import Counter
  from typing import Dict, List, Optional, Tuple
  import torch
  from pytext.common.constants import SpecialTokens, Token
  from pytext.utils import cuda, precision
label_desc: Use image node_id 2 for calling the VocabBuilder obj's underlying member method code with example usage: obj.add_all(values) without return types