code: def dwt3D(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
  
file_path: dipy/dipy/core/wavelet.py
imports: import numpy
  from dipy.denoise import nlmeans_block
label_desc: Use image node_id 7 for calling a global function with example usage: dwt3D(x, J, af) and returns: w