code: def auto_response_msmt(
      gtab,
      data,
      tol=20,
      roi_center=None,
      roi_radii=10,
      wm_fa_thr=0.7,
      gm_fa_thr=0.3,
      csf_fa_thr=0.15,
      gm_md_thr=0.001,
      csf_md_thr=0.0032,
  ):
      """Automatic estimation of multi-shell multi-tissue (msmt) response
          functions using FA and MD.
  
      Parameters
      ----------
      gtab : GradientTable
      data : ndarray
          diffusion data
      tol : int, optional
          Tolerance gap for b-values clustering.
      roi_center : array-like, (3,)
          Center of ROI in data. If center is None, it is assumed that it is
          the center of the volume with shape `data.shape[:3]`.
      roi_radii : int or array-like, (3,)
          radii of cuboid ROI
      wm_fa_thr : float
          FA threshold for WM.
      gm_fa_thr : float
          FA threshold for GM.
      csf_fa_thr : float
          FA threshold for CSF.
      gm_md_thr : float
          MD threshold for GM.
      csf_md_thr : float
          MD threshold for CSF.
  
      Returns
      -------
      response_wm : ndarray, (len(unique_bvals_tolerance(gtab.bvals))-1, 4)
          (`evals`, `S0`) for WM for each unique bvalues (except b0).
      response_gm : ndarray, (len(unique_bvals_tolerance(gtab.bvals))-1, 4)
          (`evals`, `S0`) for GM for each unique bvalues (except b0).
      response_csf : ndarray, (len(unique_bvals_tolerance(gtab.bvals))-1, 4)
          (`evals`, `S0`) for CSF for each unique bvalues (except b0).
  
      Notes
      -----
      In msmt-CSD there is an important pre-processing step: the estimation of
      every tissue's response function. In order to do this, we look for voxels
      corresponding to WM, GM and CSF. We get this information from
      mcsd.mask_for_response_msmt(), which returns masks of selected voxels
      (more details are available in the description of the function).
  
      With the masks, we compute the response functions by using
      mcsd.response_from_mask_msmt(), which returns the `response` for each
      tissue (more details are available in the description of the function).
      """
  
      list_bvals = unique_bvals_tolerance(gtab.bvals)
      if not np.all(list_bvals <= 1200):
          msg_bvals = """Some b-values are higher than 1200.
          The DTI fit might be affected. It is advised to use
          mask_for_response_msmt with bvalues lower than 1200, followed by
          response_from_mask_msmt with all bvalues to overcome this."""
          warnings.warn(msg_bvals, UserWarning)
      mask_wm, mask_gm, mask_csf = mask_for_response_msmt(
          gtab,
          data,
          roi_center,
          roi_radii,
          wm_fa_thr,
          gm_fa_thr,
          csf_fa_thr,
          gm_md_thr,
          csf_md_thr,
      )
      response_wm, response_gm, response_csf = response_from_mask_msmt(
          gtab, data, mask_wm, mask_gm, mask_csf, tol
      )
  
      return response_wm, response_gm, response_csf
  
imports: from packaging.version import Version
  import numbers
  import warnings
  import numpy
  from dipy.core import geometry
  from dipy.core.gradients import GradientTable, gradient_table, unique_bvals_tolerance, get_bval_indices
  from dipy.data import default_sphere
  from dipy.reconst import shm
  from dipy.reconst.csdeconv import response_from_mask_ssst
  from dipy.reconst.dti import TensorModel, fractional_anisotropy, mean_diffusivity
  from dipy.reconst.multi_voxel import multi_voxel_fit
  from dipy.reconst.utils import _roi_in_volume, _mask_from_roi
  from dipy.sims.voxel import single_tensor
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 8 for calling a global function with example usage: auto_response_msmt(gtab, data, tol, roi_center, roi_radii, wm_fa_thr, gm_fa_thr, csf_fa_thr, gm_md_thr, csf_md_thr) and returns: response_wm,  response_gm,  response_csf