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 torch
  import torch.nn
  from .mol_tree import Vocab, MolTree
  from .nnutils import create_var
  from .jtnn_enc import JTNNEncoder
  from .jtnn_dec import JTNNDecoder
  from .mpn import MPN, mol2graph
  from .jtmpn import JTMPN
  from .chemutils import enum_assemble, set_atommap, copy_edit_mol, attach_mols, atom_equal, decode_stereo
  import rdkit
  import rdkit.Chem
  from rdkit import DataStructs
  from rdkit.Chem import AllChem
  import copy
  import math
label_desc: Use image node_id 1 for calling a global function with example usage: set_batch_nodeID(mol_batch, vocab) without return types