def convert_pyr_coeffs_to_pyr(pyr_coeffs):
    """this function takes a 'new pyramid' and returns the coefficients as a list

    this is to enable backwards compatibility

    Parameters
    ----------
    pyr_coeffs : `dict`
        The `pyr_coeffs` attribute of a `pyramid`.

    Returns
    -------
    coeffs : `list`
        list of `np.array`, which contains the pyramid coefficients in each band, in order from
        bottom of the pyramid to top (going through the orientations in order)
    highpass : `np.array` or None
        either the residual highpass from the pyramid or, if that doesn't exist, None
    lowpass : `np.array` or None
        either the residual lowpass from the pyramid or, if that doesn't exist, None

    """
    highpass = pyr_coeffs.pop('residual_highpass', None)
    lowpass = pyr_coeffs.pop('residual_lowpass', None)
    coeffs = [i[1] for i in sorted(pyr_coeffs.items(), key=lambda x: x[0])]
    return coeffs, highpass, lowpass