code: def test_mvoxel_global_fit():
      # Verify form of results in global fitting paradigm.
  
      data, gtab = dsi_voxels()  # multi-voxel data
      sphere = default_sphere  # repulsion 724
  
      # Models to validate
      rumba_sos = RumbaSDModel(
          gtab,
          recon_type="sos",
          n_iter=5,
          n_coils=32,
          R=1,
          voxelwise=False,
          verbose=True,
          sphere=sphere,
      )
      rumba_sos_tv = RumbaSDModel(
          gtab,
          recon_type="sos",
          n_iter=5,
          n_coils=32,
          R=1,
          voxelwise=False,
          use_tv=True,
          sphere=sphere,
      )
      rumba_r = RumbaSDModel(
          gtab,
          recon_type="smf",
          n_iter=5,
          n_coils=1,
          R=2,
          voxelwise=False,
          sphere=sphere,
      )
      rumba_r_tv = RumbaSDModel(
          gtab,
          recon_type="smf",
          n_iter=5,
          n_coils=1,
          R=2,
          voxelwise=False,
          use_tv=True,
          sphere=sphere,
      )
      model_list = [rumba_sos, rumba_sos_tv, rumba_r, rumba_r_tv]
  
      # Test each model with/without TV regularization
      for model in model_list:
          msg = "There is overlap in clustering of b-value.*"
          with warnings.catch_warnings():
              warnings.filterwarnings(
                  "ignore", message=msg, category=UserWarning
              )
              model_fit = model.fit(data)
          odf = model_fit.odf(sphere)
          f_iso = model_fit.f_iso
          f_wm = model_fit.f_wm
          f_gm = model_fit.f_gm
          f_csf = model_fit.f_csf
          combined = model_fit.combined_odf_iso
  
          # Verify shape, positivity, realness of results
          assert_equal(
              data.shape[:-1] + (len(sphere.vertices),), odf.shape
          )
          assert_equal(np.all(np.isreal(odf)), True)
          assert_equal(np.all(odf > 0), True)
  
          assert_equal(data.shape[:-1], f_iso.shape)
          assert_equal(np.all(np.isreal(f_iso)), True)
          assert_equal(np.all(f_iso > 0), True)
  
          # Verify normalization
          assert_equal(f_iso, f_gm + f_csf)
          assert_equal(
              combined, odf + f_iso[..., None] / len(sphere.vertices)
          )
          assert_almost_equal(f_iso + f_wm, np.ones(f_iso.shape))
          assert_almost_equal(
              np.sum(combined, axis=3), np.ones(f_iso.shape)
          )
          assert_equal(np.sum(odf, axis=3), f_wm)
  
imports: import warnings
  import numpy
  from numpy.testing import assert_equal, assert_almost_equal, assert_array_equal, assert_allclose, assert_raises
  from numpy.testing import assert_
  from dipy.reconst.rumba import RumbaSDModel, generate_kernel
  from dipy.reconst.csdeconv import AxSymShResponse
  from dipy.data import get_fnames, dsi_voxels, default_sphere, get_sphere
  from dipy.core.gradients import gradient_table, unique_bvals_tolerance
  from dipy.core.geometry import cart2sphere
  from dipy.core.sphere_stats import angular_similarity
  from dipy.reconst.tests.test_dsi import sticks_and_ball_dummies
  from dipy.sims.voxel import sticks_and_ball, multi_tensor, single_tensor
  from dipy.direction.peaks import peak_directions
  from dipy.reconst.shm import descoteaux07_legacy_msg
label_desc: Use image node_id 7 for calling a global function with example usage: test_mvoxel_global_fit() without return types