code: def prepare_vocab_from_config(
      vocab_file_path, config, output_index=None
  ):
      """Prepare vocab from config."""
      if output_index is None:
          label_config = config["data"]["task"]["classes"]["vocab"]
      else:
          label_config = config["data"]["task"]["classes"][
              output_index
          ]["vocab"]
  
      save_vocabs(label_config, vocab_file_path)
  
file_path: delta/delta/data/preprocess/utils.py
imports: import os
  import pickle
  import collections
  import numpy
  from absl import logging
  import delta.compat
  from delta.data.utils.vocabulary import Vocabulary
label_desc: Use image node_id 7 for calling a global function with example usage: prepare_vocab_from_config(vocab_file_path, config, output_index) without return types