code: def save_vocab(self, vocab_path):
      _freq_dict = OrderedDict(
          sorted(
              self._freq_dict.items(),
              key=lambda kv: kv[1],
              reverse=True,
          )
      )
      write_dict(vocab_path + ".word2idx.json", self._word2idx)
      write_dict(vocab_path + ".freq.json", _freq_dict)
  
imports: import logging
  import json
  import numpy
  from collections import OrderedDict
  from .None import ontology
label_desc: Use image node_id 8 for calling the Vocab obj's underlying member method code with example usage: obj.save_vocab(vocab_path) without return types