code: def load_vocabulary(path):
      with io.open(path, encoding="utf-8") as f:
          # +2 for UNK and EOS
          word_ids = {line.strip(): i + 2 for i, line in enumerate(f)}
      word_ids["<UNK>"] = 0
      word_ids["<EOS>"] = 1
      return word_ids
  
imports: import argparse
  import datetime
  import io
  from nltk.translate import bleu_score
  import numpy
  import progressbar
  import six
  import chainer
  import chainer.functions
  import chainer.links
  from chainer import training
  from chainer.training import extensions
  import chainerx
label_desc: Use image node_id 4 for calling a global function with example usage: load_vocabulary(path) and returns: word_ids