code: def threshold_propagator(P, estimated_snr=15.0):
      """
      Applies hard threshold on the propagator to remove background noise for the
      deconvolution.
      """
      P_thresholded = P.copy()
      threshold = P_thresholded.max() / float(estimated_snr)
      P_thresholded[P_thresholded < threshold] = 0
      return P_thresholded / P_thresholded.sum()
  
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 8 for calling a global function with example usage: threshold_propagator(P, estimated_snr) and returns: unknown