code: def test_mask_for_response_msmt_nvoxels(rng):
      gtab, data, _, _ = get_test_data(rng)
  
      with warnings.catch_warnings(record=True) as w:
          wm_mask, gm_mask, csf_mask = mask_for_response_msmt(
              gtab,
              data,
              roi_center=None,
              roi_radii=(1, 1, 0),
              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,
          )
  
      npt.assert_equal(len(w), 1)
      npt.assert_(issubclass(w[0].category, UserWarning))
      npt.assert_(
          """Some b-values are higher than 1200.""" in str(w[0].message)
      )
  
      wm_nvoxels = np.sum(wm_mask)
      gm_nvoxels = np.sum(gm_mask)
      csf_nvoxels = np.sum(csf_mask)
      npt.assert_equal(wm_nvoxels, 5)
      npt.assert_equal(gm_nvoxels, 2)
      npt.assert_equal(csf_nvoxels, 2)
  
      with warnings.catch_warnings(record=True) as w:
          wm_mask, gm_mask, csf_mask = mask_for_response_msmt(
              gtab,
              data,
              roi_center=None,
              roi_radii=(1, 1, 0),
              wm_fa_thr=1,
              gm_fa_thr=0,
              csf_fa_thr=0,
              gm_md_thr=0,
              csf_md_thr=0,
          )
          npt.assert_equal(len(w), 6)
          npt.assert_(issubclass(w[0].category, UserWarning))
          npt.assert_(
              """Some b-values are higher than 1200."""
              in str(w[0].message)
          )
          npt.assert_(
              "No voxel with a FA higher than 1 were found"
              in str(w[1].message)
          )
          npt.assert_(
              "No voxel with a FA lower than 0 were found"
              in str(w[2].message)
          )
          npt.assert_(
              "No voxel with a MD lower than 0 were found"
              in str(w[3].message)
          )
          npt.assert_(
              "No voxel with a FA lower than 0 were found"
              in str(w[4].message)
          )
          npt.assert_(
              "No voxel with a MD lower than 0 were found"
              in str(w[5].message)
          )
  
      wm_nvoxels = np.sum(wm_mask)
      gm_nvoxels = np.sum(gm_mask)
      csf_nvoxels = np.sum(csf_mask)
      npt.assert_equal(wm_nvoxels, 0)
      npt.assert_equal(gm_nvoxels, 0)
      npt.assert_equal(csf_nvoxels, 0)
  
imports: import warnings
  from dipy.reconst.mcsd import mask_for_response_msmt, response_from_mask_msmt, auto_response_msmt
  from dipy.reconst.mcsd import MultiShellDeconvModel, multi_shell_fiber_response
  import numpy
  import numpy.testing
  import pytest
  from dipy.sims.voxel import single_tensor, multi_tensor, add_noise
  from dipy.reconst import shm
  from dipy.data import default_sphere, get_3shell_gtab
  from dipy.core.gradients import GradientTable
  from dipy.testing.decorators import set_random_number_generator
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 9 for calling a global function with example usage: test_mask_for_response_msmt_nvoxels(rng) without return types