human
I wrote the below code

    assert_is_spectral_unit(rest)
    ckms = _si.c.to_value(u'km/s')
    def to_vel_freq(x):
        restfreq = rest.to_value(si.Hz, equivalencies=spectral())
        return ((ckms * (restfreq - x)) / x)
    def from_vel_freq(x):
        restfreq = rest.to_value(si.Hz, equivalencies=spectral())
        voverc = (x / ckms)
        return (restfreq / (1 + voverc))
    def to_vel_wav(x):
        restwav = rest.to_value(si.AA, spectral())
        return (ckms * ((x / restwav) - 1))
    def from_vel_wav(x):
        restwav = rest.to_value(si.AA, spectral())
        voverc = (x / ckms)
        return (restwav * (1 + voverc))
    def to_vel_en(x):
        resten = rest.to_value(si.eV, equivalencies=spectral())
        return ((ckms * (resten - x)) / x)
    def from_vel_en(x):
        resten = rest.to_value(si.eV, equivalencies=spectral())
        voverc = (x / ckms)
        return (resten / (1 + voverc))
    return [(si.Hz, (si.km / si.s), to_vel_freq, from_vel_freq), (si.AA, (si.km / si.s), to_vel_wav, from_vel_wav), (si.eV, (si.km / si.s), to_vel_en, from_vel_en)]

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def doppler_optical(rest):