def normalize(self, mol):
log.debug('<STR_LIT>')<EOL>fragments = []<EOL>for fragment in Chem.GetMolFrags(mol, asMols=True):<EOL><INDENT>fragments.append(self._normalize_fragment(fragment))<EOL><DEDENT>outmol = fragments.pop()<EOL>for fragment in fragments:<EOL><INDENT>outmol = Chem.CombineMols(outmol, fragment)<EOL><DEDENT>Chem.SanitizeMol(outmol)<EOL>return outmol<EOL>
Apply a series of Normalization transforms to correct functional groups and recombine charges.

        A series of transforms are applied to the molecule. For each Normalization, the transform is applied repeatedly
        until no further changes occur. If any changes occurred, we go back and start from the first Normalization
        again, in case the changes mean an earlier transform is now applicable. The molecule is returned once the entire
        series of Normalizations cause no further changes or if max_restarts (default 200) is reached.

        :param mol: The molecule to normalize.
        :type mol: rdkit.Chem.rdchem.Mol
        :return: The normalized fragment.
        :rtype: rdkit.Chem.rdchem.Mol