code: def add_symbol(self, sym):
      if sym not in self.sym2idx:
          self.idx2sym.append(sym)
          self.sym2idx[sym] = len(self.idx2sym) - 1
  
imports: import os
  from collections import Counter, OrderedDict
  import torch
label_desc: Use image node_id 10 for calling the Vocab obj's underlying member method code with example usage: obj.add_symbol(sym) without return types