code: def idx(words):
      w2i = {}
      for i, w in enumerate(words):
          if w not in w2i:
              w2i[w] = i
      return w2i
  
file_path: fastText/alignment/utils.py
imports: import io
  import numpy
  import collections
label_desc: Use image node_id 2 for calling a global function with example usage: idx(words) and returns: w2i