docstr: :param list vocab: the list of the label
  :return: dict
code: def get_vocab(self, vocab):
      r"""
      :param list vocab: the list of the label
      :return: dict
  
      """
      assert isinstance(vocab, list)
      res = {}
      for i, j in enumerate(vocab):
          res[j] = i
      return res
  
file_path: textflint/textflint/input/model/flint_model/flint_model_cws.py
imports: import torch
  from .flint_model import FlintModel, TASK_METRICS
label_desc: Use image node_id 5 for calling the FlintModelCWS obj's underlying member method code with example usage: obj.get_vocab(vocab) and returns: res