code: def test_mapmri_metrics_anisotropic(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, angle2=0)
  
      # test MAPMRI q-space indices
  
      mapm = MapmriModel(
          gtab,
          radial_order=radial_order,
          laplacian_regularization=False,
      )
      mapfit = mapm.fit(S)
      tau = 1 / (4 * np.pi**2)
  
      # ground truth indices estimated from the DTI tensor
      rtpp_gt = 1.0 / (2 * np.sqrt(np.pi * l1 * tau))
      rtap_gt = (
          1.0
          / (2 * np.sqrt(np.pi * l2 * tau))
          * 1.0
          / (2 * np.sqrt(np.pi * l3 * tau))
      )
      rtop_gt = rtpp_gt * rtap_gt
      msd_gt = 2 * (l1 + l2 + l3) * tau
      qiv_gt = (
          64
          * np.pi ** (7 / 2.0)
          * (l1 * l2 * l3 * tau**3) ** (3 / 2.0)
      ) / ((l2 * l3 + l1 * (l2 + l3)) * tau**2)
  
      assert_almost_equal(mapfit.rtap(), rtap_gt, 5)
      assert_almost_equal(mapfit.rtpp(), rtpp_gt, 5)
      assert_almost_equal(mapfit.rtop(), rtop_gt, 5)
      with warnings.catch_warnings(record=True) as w:
          ng = mapfit.ng()
          ng_parallel = mapfit.ng_parallel()
          ng_perpendicular = mapfit.ng_perpendicular()
          assert_equal(len(w), 3)
          for l_w in w:
              assert_(issubclass(l_w.category, UserWarning))
              assert_(
                  "model bval_threshold must be lower than 2000".lower()
                  in str(l_w.message).lower()
              )
  
      assert_almost_equal(ng, 0.0, 5)
      assert_almost_equal(ng_parallel, 0.0, 5)
      assert_almost_equal(ng_perpendicular, 0.0, 5)
      assert_almost_equal(mapfit.msd(), msd_gt, 5)
      assert_almost_equal(mapfit.qiv(), qiv_gt, 5)
  
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 13 for calling a global function with example usage: test_mapmri_metrics_anisotropic(radial_order) without return types