code: def local_attach(ctr_mol, neighbors, prev_nodes, amap_list):
      ctr_mol = copy_edit_mol(ctr_mol)
      nei_amap = {nei.nid: {} for nei in prev_nodes + neighbors}
  
      for nei_id, ctr_atom, nei_atom in amap_list:
          nei_amap[nei_id][nei_atom] = ctr_atom
  
      ctr_mol = attach_mols(ctr_mol, neighbors, prev_nodes, nei_amap)
      return ctr_mol.GetMol()
  
imports: import rdkit
  import rdkit.Chem
  from scipy.sparse import csr_matrix
  from scipy.sparse.csgraph import minimum_spanning_tree
  from collections import defaultdict
  from rdkit.Chem.EnumerateStereoisomers import EnumerateStereoisomers, StereoEnumerationOptions
  from .vocab import Vocab
label_desc: Use image node_id 13 for calling a global function with example usage: local_attach(ctr_mol, neighbors, prev_nodes, amap_list) and returns: ctr_mol