code: def get_mol_subset(coords, mol, atom_indices_to_keep):
      """Strip a subset of the atoms in this molecule
  
      Parameters
      ----------
      coords: Numpy ndarray
          Must be of shape (N, 3) and correspond to coordinates of mol.
      mol: Rdkit mol or `MolecularFragment`
          The molecule to strip
      atom_indices_to_keep: list
          List of the indices of the atoms to keep. Each index is a unique
          number between `[0, N)`.
  
      Returns
      -------
      A tuple of (coords, mol_frag) where coords is a Numpy array of
      coordinates with hydrogen coordinates. mol_frag is a
      `MolecularFragment`.
      """
      from rdkit import Chem
  
      indexes_to_keep = []
      atoms_to_keep = []
      #####################################################
      # Compute partial charges on molecule if rdkit
      if isinstance(mol, Chem.Mol):
          compute_charges(mol)
      #####################################################
      atoms = list(mol.GetAtoms())
      for index in atom_indices_to_keep:
          indexes_to_keep.append(index)
          atoms_to_keep.append(atoms[index])
      coords = coords[indexes_to_keep]
      mol_frag = MolecularFragment(atoms_to_keep, coords)
      return coords, mol_frag
  
imports: import os
  import logging
  import itertools
  import numpy
  from io import StringIO
  from deepchem.utils.pdbqt_utils import pdbqt_to_pdb
  from deepchem.utils.pdbqt_utils import convert_mol_to_pdbqt
  from deepchem.utils.pdbqt_utils import convert_protein_to_pdbqt
  from deepchem.utils.geometry_utils import compute_pairwise_distances
  from deepchem.utils.geometry_utils import compute_centroid
  from deepchem.utils.fragment_utils import MolecularFragment
  from deepchem.utils.fragment_utils import MoleculeLoadException
  from typing import Any, List, Sequence, Tuple, Set, Optional, Dict, Union
  from deepchem.utils.typing import OneOrMany, RDKitMol
label_desc: Use image node_id 16 for calling a global function with example usage: get_mol_subset(coords, mol, atom_indices_to_keep) and returns: coords,  mol_frag