human
Complete the below
def doppler_radio(rest):

    ''''Return the equivalency pairs for the radio convention for velocity.
    The radio convention for the relation between velocity and frequency is:
    :math:`V = c \frac{f_0 - f}{f_0} .
 f(V) = f_0 ( 1 - V/c )`
    Parameters
    rest : `~astropy.units.Quantity`
    Any quantity supported by the standard spectral equivalencies
    (wavelength, energy, frequency, wave number).
    References
    `NRAO site defining the conventions <http://www.gb.nrao.edu/~fghigo/gbtdoc/doppler.html>`_
    Examples
    >>> import astropy.units as u
    >>> CO_restfreq = 115.27120*u.GHz  # rest frequency of 12 CO 1-0 in GHz
    >>> radio_CO_equiv = u.doppler_radio(CO_restfreq)
    >>> measured_freq = 115.2832*u.GHz
    >>> radio_velocity = measured_freq.to(u.km/u.s, equivalencies=radio_CO_equiv)
    >>> radio_velocity  # doctest: +FLOAT_CMP
    <Quantity -31.209092088877583 km / s>'
    '''

=====
Can you provide a the Python program you requested?
assistant
#Here is the Python program you requested.
    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 (((restfreq - x) / restfreq) * ckms)
    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 (((x - restwav) / x) * ckms)
    def from_vel_wav(x):
        restwav = rest.to_value(si.AA, spectral())
        return ((restwav * ckms) / (ckms - x))
    def to_vel_en(x):
        resten = rest.to_value(si.eV, equivalencies=spectral())
        return (((resten - x) / resten) * ckms)
    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)]