code: def test_multi_shell_fiber_response():
      sh_order = 8
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=shm.descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          response = multi_shell_fiber_response(
              sh_order,
              [0, 1000, 2000, 3500],
              wm_response,
              gm_response,
              csf_response,
          )
  
      npt.assert_equal(response.response.shape, (4, 7))
  
      btens = ["LTE", "PTE", "STE", "CTE"]
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=shm.descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          response = multi_shell_fiber_response(
              sh_order,
              [0, 1000, 2000, 3500],
              wm_response,
              gm_response,
              csf_response,
              btens=btens,
          )
  
      npt.assert_equal(response.response.shape, (4, 7))
  
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter(
              "always", category=PendingDeprecationWarning
          )
          response = multi_shell_fiber_response(
              sh_order,
              [1000, 2000, 3500],
              wm_response,
              gm_response,
              csf_response,
          )
          # Test that the number of warnings raised is greater than 1, with
          # deprecation warnings being raised from using legacy SH bases as well
          # as a warning from multi_shell_fiber_response
          npt.assert_(len(w) > 1)
          # The last warning in list is the one from multi_shell_fiber_response
          npt.assert_(issubclass(w[-1].category, UserWarning))
          npt.assert_(
              """No b0 given. Proceeding either way."""
              in str(w[-1].message)
          )
          npt.assert_equal(response.response.shape, (3, 7))
  
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 7 for calling a global function with example usage: test_multi_shell_fiber_response() without return types