def METHOD_NAME(formula: str, adduct: Optional[str], charge: int):
    if adduct and adduct not in ('[M]+', '[M]-'):
        formula += adduct
    iso_pattern = cpyMSpec.isotopePattern(formula)
    if charge:
        iso_pattern.addCharge(charge)
    return iso_pattern.masses[np.argmax(iso_pattern.intensities)]