code: def convert2id(sentence, fieldOfStudy, word2idx, entity2idx):
      words = sentence.split(" ")
      word_idx = [add2dict(word, word2idx) for word in words]
      entity_idx = parse_entities(
          fieldOfStudy, entity2idx, len(word_idx)
      )
      return word_idx, entity_idx
  
imports: import codecs
  import pickle
  import time
  import os
  from datetime import datetime
  import random
  import numpy
  import math
  from multiprocessing import Process
  from utils.general import *
  from utils.data_helper import *
label_desc: Use image node_id 3 for calling a global function with example usage: convert2id(sentence, fieldOfStudy, word2idx, entity2idx) and returns: word_idx,  entity_idx