code: def multi_median(data, median_radius, numpass):
      """Applies median filter multiple times on input data.
  
      Parameters
      ----------
      data : ndarray
          The input volume to apply filter on.
      median_radius : int
          Radius (in voxels) of the applied median filter
      numpass: int
          Number of pass of the median filter
  
      Returns
      -------
      data : ndarray
          Filtered input volume.
      """
      # Array representing the size of the median window in each dimension.
      medarr = np.ones_like(data.shape) * ((median_radius * 2) + 1)
  
      if numpass > 1:
          # ensure the input array is not modified
          data = data.copy()
  
      # Multi pass
      output = np.empty_like(data)
      for i in range(0, numpass):
          median_filter(data, medarr, output=output)
          data, output = output, data
      return data
  
file_path: dipy/dipy/segment/mask.py
imports: from warnings import warn
  import numpy
  from dipy.reconst.dti import fractional_anisotropy, color_fa
  from scipy.ndimage import median_filter
  from scipy.ndimage import binary_dilation, generate_binary_structure
label_desc: Use image node_id 1 for calling a global function with example usage: multi_median(data, median_radius, numpass) and returns: data