code: def _create_component_map(
      mol: RDKitMol, components: List[List[int]]
  ) -> Dict[int, int]:
      """Creates a map from atom ids to disconnected component id
  
      For each atom in `mol`, maps it to the id of the component in the
      molecule. The intent is that this is used on a molecule whose
      rotatable bonds have been removed. `components` is a list of the
      connected components after this surgery.
  
      Parameters
      ----------
      mol: rdkit.Chem.rdchem.Mol
          The molecule to find disconnected components in
      components: List[List[int]]
          List of connected components
  
      Returns
      -------
      comp_map: Dict[int, int]
          Maps atom ids to component ides
      """
      comp_map = {}
      for i in range(mol.GetNumAtoms()):
          for j in range(len(components)):
              if i in components[j]:
                  comp_map[i] = j
                  break
      return comp_map
  
file_path: deepchem/deepchem/utils/pdbqt_utils.py
imports: from typing import Dict, List, Optional, Set, Tuple
  from deepchem.utils.typing import RDKitMol
label_desc: Use image node_id 7 for calling a global function with example usage: _create_component_map(mol, components) and returns: comp_map