code: def test_mapmri_compare_fitted_pdf_with_multi_tensor(radial_order=6):
      gtab = get_gtab_taiwan_dsi()
      l1, l2, l3 = [0.0015, 0.0003, 0.0003]
      S, _ = generate_signal_crossing(gtab, l1, l2, l3)
  
      radius_max = 0.02  # 40 microns
      gridsize = 10
      r_points = mapmri.create_rspace(gridsize, radius_max)
  
      # test MAPMRI fitting
      mapm = MapmriModel(
          gtab, radial_order=radial_order, laplacian_weighting=0.0001
      )
      mapfit = mapm.fit(S)
  
      # compare the mapmri pdf with the ground truth multi_tensor pdf
  
      mevals = np.array(([l1, l2, l3], [l1, l2, l3]))
      angl = [(0, 0), (60, 0)]
      pdf_mt = multi_tensor_pdf(
          r_points, mevals=mevals, angles=angl, fractions=[50, 50]
      )
      pdf_map = mapfit.pdf(r_points)
  
      nmse_pdf = np.sqrt(np.sum((pdf_mt - pdf_map) ** 2)) / (
          pdf_mt.sum()
      )
      assert_almost_equal(nmse_pdf, 0.0, 2)
  
imports: import platform
  import time
  from math import factorial
  from scipy.special import gamma
  import scipy.integrate
  import warnings
  import numpy
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_equal, assert_, assert_raises
  import pytest
  from dipy.core.sphere_stats import angular_similarity
  from dipy.core.subdivide_octahedron import create_unit_sphere
  from dipy.data import get_gtab_taiwan_dsi, default_sphere
  from dipy.direction.peaks import peak_directions
  from dipy.reconst.mapmri import MapmriModel, mapmri_index_matrix
  from dipy.reconst import dti, mapmri
  from dipy.reconst.odf import gfa
  from dipy.reconst.tests.test_dsi import sticks_and_ball_dummies
  from dipy.reconst.shm import sh_to_sf, descoteaux07_legacy_msg
  from dipy.sims.voxel import multi_tensor, multi_tensor_pdf, add_noise, single_tensor, cylinders_and_ball_soderman
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 12 for calling a global function with example usage: test_mapmri_compare_fitted_pdf_with_multi_tensor(radial_order) without return types