class_docstr: A base class for common vocabulary operations. Each subclass should at least 
  implement its own build_vocab() function.
docstr: Returns a new Vocab instance constructed from a state dict. 
docstr_tok: ["Returns","a","new","Vocab","instance","constructed","from","a","state","dict","."]
code: def load_state_dict(cls, state_dict):
      """Returns a new Vocab instance constructed from a state dict."""
      new = cls()
      for attr, value in state_dict.items():
          setattr(new, attr, value)
      return new
  
imports: from copy import copy
  from collections import Counter, OrderedDict
  from collections.abc import Iterable
  import os
  import pickle
label_desc: Use image node_id 4 for calling the BaseVocab obj's underlying member method code with example usage: obj.load_state_dict(cls, state_dict) and returns: new