code: def create_vocab_index(vocab_list, net, net_workspace, index_name):
      vocab_blob = net.AddExternalInput(f"{index_name}_vocab")
  
      net.GivenTensorStringFill(
          [],
          [str(vocab_blob)],
          arg=[
              utils.MakeArgument("shape", vocab_list.shape),
              utils.MakeArgument("values", vocab_list),
          ],
      )
  
      vocab_index = net.StringIndexCreate([], index_name)
      net.IndexLoad(
          [vocab_index, vocab_blob], [vocab_index], skip_first_entry=0
      )
      net.IndexFreeze([vocab_index], [vocab_index])
  
      return vocab_index
  
file_path: pytext/pytext/utils/mobile_onnx.py
imports: import itertools
  import numpy
  import onnx
  import torch
  from caffe2.python import core, utils, workspace
  from caffe2.python.onnx import backend
  from pytext.utils.onnx import convert_caffe2_blob_name
label_desc: Use image node_id 6 for calling a global function with example usage: create_vocab_index(vocab_list, net, net_workspace, index_name) and returns: vocab_index