code: def load_vocab(vocab_file):
      """Loads a vocabulary file into a dictionary."""
      vocab = collections.OrderedDict()
      fin = open(vocab_file)
      for num, line in enumerate(fin):
          items = convert_to_unicode(line.strip()).split("\t")
          if len(items) > 2:
              break
          token = items[0]
          index = items[1] if len(items) == 2 else num
          token = token.strip()
          vocab[token] = int(index)
      return vocab
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import unicodedata
  import six
label_desc: Use image node_id 2 for calling a global function with example usage: load_vocab(vocab_file) and returns: vocab