def METHOD_NAME(x, J, af):
    """3-D Discrete Wavelet Transform
    Parameters
    ----------
    x : 3D ndarray
        N1 x N2 x N3 matrix
        1) Ni all even
        2) min(Ni) >= 2^(J-1)*length(af)
    J : int
        number of stages
    af : 2D ndarray
        analysis filters
    Returns
    -------
    w : cell array
        wavelet coefficients
    """
    w = [None] * (J + 1)
    for k in range(J):
        x, w[k] = afb3D(x, af, af, af)
    w[J] = x
    return w