<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def precompute_raveled_slices(coeff_shapes, axes=None):
 """Return slices and shapes for raveled multilevel wavelet coefficients. The output is equivalent to the ``coeff_slices`` output of `pywt.ravel_coeffs`, but this function does not require computing a wavelet transform first. Parameters coeff_shapes : array-like A list of multilevel wavelet coefficient shapes as returned by `pywt.wavedecn_shapes`. axes : sequence of ints, optional Axes over which the DWT that created ``coeffs`` was performed. The default value of None corresponds to all axes. Returns ------- coeff_slices : list List of slices corresponding to each coefficient. As a 2D example, ``coeff_arr[coeff_slices[1]['dd']]`` would extract the first level detail coefficients from ``coeff_arr``. Examples -------- slice(None, 64, None) (slice(1024, 2048, None), slice(2048, 3072, None), slice(3072, 4096, None)) """

    # initialize with the approximation coefficients.
    a_shape = coeff_shapes[0]
    a_size = np.prod(a_shape)

    if len(coeff_shapes) == 1:
        # only a single approximation coefficient array was found
        return [slice(a_size), ]

    a_slice = slice(a_size)

    # initialize list of coefficient slices
    coeff_slices = []
    coeff_slices.append(a_slice)

    # loop over the detail cofficients, embedding them in coeff_arr
    details_list = coeff_shapes[1:]
    offset = a_size
    for shape_dict in details_list:
        # new dictionaries for detail coefficient slices and shapes
        coeff_slices.append({})
        keys = sorted(shape_dict.keys())
        for key in keys:
            shape = shape_dict[key]
            size = np.prod(shape)
            sl = slice(offset, offset + size)
            offset += size
            coeff_slices[-1][key] = sl
    return coeff_slices