code: def compute_charges(mol):
      """Attempt to compute Gasteiger Charges on Mol
  
      This also has the side effect of calculating charges on mol.  The
      mol passed into this function has to already have been sanitized
  
      Parameters
      ----------
      mol: rdkit molecule
  
      Returns
      -------
      No return since updates in place.
  
      Note
      ----
      This function requires RDKit to be installed.
      """
      from rdkit.Chem import AllChem
  
      try:
          # Updates charges in place
          AllChem.ComputeGasteigerCharges(mol)
      except Exception as e:
          logging.exception("Unable to compute charges for mol")
          raise MoleculeLoadException(e)
  
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 4 for calling a global function with example usage: compute_charges(mol) without return types