code: def test_response_from_mask_msmt(rng):
      gtab, data, masks_gt, responses_gt = get_test_data(rng)
  
      response_wm, response_gm, response_csf = response_from_mask_msmt(
          gtab, data, masks_gt[0], masks_gt[1], masks_gt[2], tol=20
      )
  
      # Verifying that csf's response is greater than gm's
      npt.assert_equal(
          np.sum(response_csf[:, :3]) > np.sum(response_gm[:, :3]), True
      )
      # Verifying that csf and gm are described by spheres
      npt.assert_almost_equal(response_csf[:, 1], response_csf[:, 2])
      npt.assert_allclose(
          response_csf[:, 0], response_csf[:, 1], rtol=1, atol=0
      )
      npt.assert_almost_equal(response_gm[:, 1], response_gm[:, 2])
      npt.assert_allclose(
          response_gm[:, 0], response_gm[:, 1], rtol=1, atol=0
      )
      # Verifying that wm is anisotropic in one direction
      npt.assert_almost_equal(response_wm[:, 1], response_wm[:, 2])
      npt.assert_equal(
          response_wm[:, 0] > 2.5 * response_wm[:, 1], True
      )
  
      # Verifying with ground truth for the first bvalue
      npt.assert_array_almost_equal(response_wm[0], responses_gt[0], 1)
      npt.assert_array_almost_equal(response_gm[0], responses_gt[1], 1)
      npt.assert_array_almost_equal(response_csf[0], responses_gt[2], 1)
  
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 10 for calling a global function with example usage: test_response_from_mask_msmt(rng) without return types