code: def index_dictionary(dictionary, es, index_name):
      for item in dictionary.data:
          print("Index ", item)
          try:
              item_data = dictionary.data[item]
              doc = {"word": item, "data": item_data}
              es.index(index=index_name, body=doc)
          except Exception as e:
              print(e)
  
imports: import os
  from os.path import join, dirname
  from elasticsearch import Elasticsearch
  from underthesea.utils.col_dictionary import Dictionary
label_desc: Use image node_id 1 for calling a global function with example usage: index_dictionary(dictionary, es, index_name) without return types