class_docstr: vocabulary 
docstr: trim word freq less than min_frequency
docstr_tok: ["trim","word","freq","less","than","min_frequency"]
code: def trim(self, min_frequency):
      """trim word freq less than min_frequency"""
      # sort by frequency
      self._freq = sorted(
          self._freq.items(), key=lambda x: x[1], reverse=True
      )
  
      if self.use_default_dict:
          self._mapping = copy.deepcopy(self._default_dict)
          idx = len(self._default_dict)
      else:
          self._mapping = {}
          idx = 0
  
      for word, count in self._freq:
          if count < min_frequency:
              break
          if word in self._mapping:
              continue
          self._mapping[word] = idx
          idx += 1
      self._freq = dict(self._freq[: idx - 1])
  
file_path: delta/delta/data/utils/vocabulary.py
imports: import copy
  import collections
label_desc: Use image node_id 4 for calling the Vocabulary obj's underlying member method code with example usage: obj.trim(min_frequency) without return types