code: def encode(self, mol_batch):
      set_batch_nodeID(mol_batch, self.vocab)
      root_batch = [mol_tree.nodes[0] for mol_tree in mol_batch]
      tree_mess, tree_vec = self.jtnn(root_batch)
  
      smiles_batch = [mol_tree.smiles for mol_tree in mol_batch]
      mol_vec = self.mpn(mol2graph(smiles_batch))
      return tree_mess, tree_vec, mol_vec
  
imports: import torch
  import torch.nn
  from .mol_tree import Vocab, MolTree
  from .nnutils import create_var
  from .jtnn_enc_bo import JTNNEncoderBO
  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 2 for calling the JTNNVAEBO obj's underlying member method code with example usage: obj.encode(mol_batch) and returns: tree_mess,  tree_vec,  mol_vec