class_docstr: Implementation of Dataset class
  
  This is a simple implementation of loading and processing dataset for GATNE model.
  
  Args:
      config: dict, some configure parameters.
class_docstr_tok: ["Implementation","of","Dataset","class","This","is","a","simple","implementation","of","loading","and","processing","dataset","for","GATNE","model",".","Args",":","config",":","dict",",","some","configure","parameters","."]
docstr: Load words(nodes) from file and map to index.
          
docstr_tok: ["Load","words","(","nodes",")","from","file","and","map","to","index","."]
code: def load_word2index(self):
      """Load words(nodes) from file and map to index."""
      word2index = {}
      with open(self.nodes_file, "r") as reader:
          for index, line in enumerate(reader):
              node = line.strip()
              word2index[node] = index
  
      return word2index
  
file_path: PGL/legacy/examples/GATNE/Dataset.py
imports: import sys
  import os
  import tqdm
  import numpy
  import logging
  import random
  from pgl import heter_graph
  import pickle
label_desc: Use image node_id 5 for calling the Dataset obj's underlying member method code with example usage: obj.load_word2index() and returns: word2index