code: def test_default_lambda_csdmodel():
      """We check that the default value of lambda is the expected value with
      the symmetric362 sphere. This value has empirically been found to work well
      and changes to this default value should be discussed with the dipy team.
      """
      expected_lambda = {4: 27.5230088, 8: 82.5713865, 16: 216.0843135}
      expected_csdmodel_warnings = {4: 0, 8: 0, 16: 1}
      expected_sh_basis_deprecation_warnings = 3
      sphere = default_sphere
  
      # Create gradient table
      _, fbvals, fbvecs = get_fnames("small_64D")
      bvals, bvecs = read_bvals_bvecs(fbvals, fbvecs)
      gtab = gradient_table(bvals, bvecs)
  
      # Some response function
      response = (np.array([0.0015, 0.0003, 0.0003]), 100)
  
      for sh_order, expected, e_warn in zip(
          expected_lambda.keys(),
          expected_lambda.values(),
          expected_csdmodel_warnings.values(),
      ):
          with warnings.catch_warnings(record=True) as w:
              warnings.simplefilter(
                  "always", category=PendingDeprecationWarning
              )
              model_full = ConstrainedSphericalDeconvModel(
                  gtab, response, sh_order=sh_order, reg_sphere=sphere
              )
              npt.assert_equal(
                  len(w) - expected_sh_basis_deprecation_warnings,
                  e_warn,
              )
              if e_warn:
                  npt.assert_(issubclass(w[0].category, UserWarning))
                  npt.assert_(
                      "Number of parameters required "
                      in str(w[0].message)
                  )
  
          with warnings.catch_warnings():
              warnings.filterwarnings(
                  "ignore",
                  message=descoteaux07_legacy_msg,
                  category=PendingDeprecationWarning,
              )
              B_reg, _, _ = real_sh_descoteaux(
                  sh_order, sphere.theta, sphere.phi
              )
          npt.assert_array_almost_equal(
              model_full.B_reg, expected * B_reg
          )
  
imports: import warnings
  import numpy
  import numpy.testing
  from numpy.testing import assert_, assert_equal, assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from dipy.testing import assert_greater, assert_greater_equal
  from dipy.data import get_sphere, get_fnames, default_sphere, small_sphere
  from dipy.sims.voxel import multi_tensor, single_tensor, multi_tensor_odf, all_tensor_evecs, single_tensor_odf
  from dipy.core.gradients import gradient_table
  from dipy.core.sphere import Sphere, HemiSphere
  from dipy.core.sphere_stats import angular_similarity
  from dipy.reconst.csdeconv import ConstrainedSphericalDeconvModel, ConstrainedSDTModel, forward_sdeconv_mat, odf_deconv, odf_sh_to_sharp, mask_for_response_ssst, response_from_mask_ssst, response_from_mask, auto_response_ssst, auto_response, recursive_response
  from dipy.direction.peaks import peak_directions
  from dipy.reconst.dti import TensorModel, fractional_anisotropy
  from dipy.reconst.shm import descoteaux07_legacy_msg, QballModel, sf_to_sh, sh_to_sf, real_sh_descoteaux, sph_harm_ind_list
  from dipy.reconst.shm import lazy_index
  from dipy.utils.deprecator import ExpiredDeprecationError
  from dipy.io.gradients import read_bvals_bvecs
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 17 for calling a global function with example usage: test_default_lambda_csdmodel() without return types