code: def hanning_filter(gtab, filter_width, origin):
      """create a hanning window
  
      The signal is premultiplied by a Hanning window before
      Fourier transform in order to ensure a smooth attenuation
      of the signal at high q values.
  
      Parameters
      ----------
      gtab : GradientTable
      filter_width : int
      origin : (3,) ndarray
          center of qspace
  
      Returns
      -------
      filter : (N,) ndarray
          where N is the number of non-b0 gradient directions
  
      """
      qtable = create_qtable(gtab, origin)
      # calculate r - hanning filter free parameter
      r = np.sqrt(
          qtable[:, 0] ** 2 + qtable[:, 1] ** 2 + qtable[:, 2] ** 2
      )
      # setting hanning filter width and hanning
      return 0.5 * np.cos(2 * np.pi * r / filter_width)
  
imports: import numpy
  from scipy.ndimage import map_coordinates
  from scipy.fftpack import fftn, fftshift, ifftshift
  from dipy.reconst.odf import OdfModel, OdfFit
  from dipy.reconst.cache import Cache
  from dipy.reconst.multi_voxel import multi_voxel_fit
label_desc: Use image node_id 3 for calling a global function with example usage: hanning_filter(gtab, filter_width, origin) and returns: unknown