code: def map_reac_to_prod(
      mol_reac: RDKitMol, mol_prod: RDKitMol
  ) -> Tuple[Dict[int, int], List[int], List[int]]:
      """Function to build a dictionary of mapping atom indices in the reactants to the products.
  
      Parameters
      ----------
      mol_reac: RDKitMol
      An RDKit molecule of the reactants.
  
      mol_prod: RDKitMol
      An RDKit molecule of the products.
  
      Returns
      -------
      mappings: Tuple[Dict[int,int],List[int],List[int]]
      A tuple containing a dictionary of corresponding reactant and product atom indices,
      list of atom ids of product not part of the mapping and
      list of atom ids of reactant not part of the mapping
  
      """
      only_prod_ids: List[int] = []
      prod_map_to_id: Dict[int, int] = {}
      mapnos_reac: Set[int] = set(
          [atom.GetAtomMapNum() for atom in mol_reac.GetAtoms()]
      )
      for atom in mol_prod.GetAtoms():
          mapno = atom.GetAtomMapNum()
          if mapno > 0:
              prod_map_to_id[mapno] = atom.GetIdx()
              if mapno not in mapnos_reac:
                  only_prod_ids.append(atom.GetIdx())
          else:
              only_prod_ids.append(atom.GetIdx())
      only_reac_ids: List[int] = []
      reac_id_to_prod_id: Dict[int, int] = {}
      for atom in mol_reac.GetAtoms():
          mapno = atom.GetAtomMapNum()
          if mapno > 0:
              try:
                  reac_id_to_prod_id[atom.GetIdx()] = prod_map_to_id[
                      mapno
                  ]
              except KeyError:
                  only_reac_ids.append(atom.GetIdx())
          else:
              only_reac_ids.append(atom.GetIdx())
      mappings: Tuple[Dict[int, int], List[int], List[int]] = (
          reac_id_to_prod_id,
          only_prod_ids,
          only_reac_ids,
      )
      return mappings
  
imports: from rdkit import Chem
  import numpy
  import logging
  from typing import List, Tuple, Union, Dict, Set, Sequence, Optional
  from deepchem.utils.typing import RDKitAtom, RDKitMol, RDKitBond
  from deepchem.feat.base_classes import MolecularFeaturizer
  from deepchem.feat.graph_data import GraphData
  from deepchem.feat.molecule_featurizers.circular_fingerprint import CircularFingerprint
  from deepchem.feat.molecule_featurizers.rdkit_descriptors import RDKitDescriptors
  from deepchem.utils.molecule_feature_utils import one_hot_encode
  from deepchem.utils.molecule_feature_utils import get_atom_total_degree_one_hot
  from deepchem.utils.molecule_feature_utils import get_atom_formal_charge_one_hot
  from deepchem.utils.molecule_feature_utils import get_atom_total_num_Hs_one_hot
  from deepchem.utils.molecule_feature_utils import get_atom_hybridization_one_hot
  from deepchem.utils.molecule_feature_utils import get_atom_is_in_aromatic_one_hot
  from deepchem.feat.graph_features import bond_features
label_desc: Use image node_id 6 for calling a global function with example usage: map_reac_to_prod(mol_reac, mol_prod) and returns: mappings