def METHOD_NAME(gmx_energies: dict) -> Quantity:
    """Canonicalize torsion energies from a set of GROMACS energies."""
    gmx_torsion = 0.0 * kj_mol
    for key in ["Torsion", "Proper Dih.", "Per. Imp. Dih."]:
        if key in gmx_energies:
            gmx_torsion += gmx_energies[key]
    return gmx_torsion