code: def create_vocab_index(vocab_list, net, net_workspace, index_name):
      vocab_index = net.StringIndexCreate([], index_name)
      vocab_blob = net.AddExternalInput(net.NextName())
      net_workspace.FeedBlob(str(vocab_blob), vocab_list)
      # Populates the index with all the vocab
      net.IndexGet([vocab_index, vocab_blob])
      # Freeze the index to not add any other words in runtime
      net.IndexFreeze([vocab_index], [vocab_index])
      return vocab_index
  
file_path: pytext/pytext/utils/onnx.py
imports: import caffe2.python.predictor.predictor_exporter
  import numpy
  import torch
  from caffe2.python import core, workspace
  from caffe2.python.onnx import backend
  from torch.onnx import ExportTypes, OperatorExportTypes
label_desc: Use image node_id 3 for calling a global function with example usage: create_vocab_index(vocab_list, net, net_workspace, index_name) and returns: vocab_index