code: def set_batch_nodeID(mol_batch, vocab):
      tot = 0
      for mol_tree in mol_batch:
          for node in mol_tree.nodes:
              node.idx = tot
              node.wid = vocab.get_index(node.smiles)
              tot += 1
  
imports: import pickle
  import os
  import random
  import torch
  import numpy
  from torch.utils.data import Dataset, DataLoader
  from .mol_tree import MolTree
  from .jtnn_enc import JTNNEncoder
  from .mpn import MPN
  from .jtmpn import JTMPN
  from .vocab import Vocab
label_desc: Use image node_id 2 for calling a global function with example usage: set_batch_nodeID(mol_batch, vocab) without return types