code: def _set_node_id(mol_tree, vocab):
      wid = []
      for i, node in enumerate(mol_tree.nodes_dict):
          mol_tree.nodes_dict[node]["idx"] = i
          wid.append(
              vocab.get_index(mol_tree.nodes_dict[node]["smiles"])
          )
  
      return wid
  
file_path: dgl/examples/pytorch/jtnn/jtnn/datautils.py
imports: import dgl
  import torch
  from dgl.data.utils import _get_dgl_url, download, extract_archive, get_download_dir
  from torch.utils.data import Dataset
  from .jtmpn import ATOM_FDIM, BOND_FDIM, mol2dgl_single
  from .mol_tree import Vocab
  from .mol_tree_nx import DGLMolTree
  from .mpn import mol2dgl_single
label_desc: Use image node_id 2 for calling a global function with example usage: _set_node_id(mol_tree, vocab) and returns: wid