code: def sfb3D_A(lo, hi, sf, d):
      """3D Synthesis Filter Bank
       (along single dimension only)
  
      Parameters
      ----------
      lo : 1D array
          lowpass subbands
      hi : 1D array
          highpass subbands
      sf : 2D ndarray
          synthesis filters
      d : int
          dimension of filtering
  
      Returns
      -------
      y : 3D ndarray
          the N1xN2xN3 matrix
      """
  
      lpf = sf[:, 0]
      hpf = sf[:, 1]
      # permute dimensions of lo and hi so that dimension d is first.
      p = [(i + d) % 3 for i in range(3)]
      lo = lo.transpose(p)
      hi = hi.transpose(p)
  
      (N1, N2, N3) = lo.shape
      N = 2 * N1
      L = sf.shape[0]
      y = np.zeros((N + L - 2, N2, N3))
      for k in range(N3):
          y[:, :, k] = np.array(
              nlmeans_block.upfir(lo[:, :, k], lpf)
          ) + np.array(nlmeans_block.upfir(hi[:, :, k], hpf))
      y[: (L - 2), :, :] = y[: (L - 2), :, :] + y[N : (N + L - 2), :, :]
      y = y[:N, :, :]
      y = cshift3D(y, 1 - L / 2, 0)
      # permute dimensions of y (inverse permutation)
      q = permutationinverse(p)
      y = y.transpose(q)
      return y
  
file_path: dipy/dipy/core/wavelet.py
imports: import numpy
  from dipy.denoise import nlmeans_block
label_desc: Use image node_id 4 for calling a global function with example usage: sfb3D_A(lo, hi, sf, d) and returns: y