def METHOD_NAME(units: str, unicode=False) -> str:
    """
    Return latex string for phonon frequencies in ``units``.
    """
    d = {'ev': 'Energy (eV)', 'mev': 'Energy (meV)', 'ha': 'Energy (Ha)',
         'cm-1': r'Frequency (cm$^{-1}$)',
         'cm^-1': r'Frequency (cm$^{-1}$)',
         'thz': r'Frequency (Thz)',
    }
    try:
        s = d[units.lower().strip()]
    except KeyError:
        raise KeyError('Value for units `{}` unknown\nPossible values are:\n {}'.format(units, list(d.keys())))
    if unicode:
        s = s.replace('$^{-1}$', '⁻¹')
    return s