code: def test_estimate_radius_with_rtap(radius_gt=5e-3):
      gtab = get_gtab_taiwan_dsi()
      tau = 1 / (4 * np.pi**2)
      # we estimate the infinite diffusion time case for a perfectly reflecting
      # cylinder using the Callaghan model
      E = cylinders_and_ball_soderman(
          gtab,
          tau,
          radii=[radius_gt],
          snr=None,
          angles=[(0, 90)],
          fractions=[100],
      )[0]
  
      # estimate radius using anisotropic MAP-MRI.
      mapmod = mapmri.MapmriModel(
          gtab,
          radial_order=6,
          laplacian_regularization=True,
          laplacian_weighting=0.01,
      )
      mapfit = mapmod.fit(E)
      radius_estimated = np.sqrt(1 / (np.pi * mapfit.rtap()))
      assert_almost_equal(radius_estimated, radius_gt, 5)
  
      # estimate radius using isotropic MAP-MRI.
      # note that the radial order is higher and the precision is lower due to
      # less accurate signal extrapolation.
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          mapmod = mapmri.MapmriModel(
              gtab,
              radial_order=8,
              laplacian_regularization=True,
              laplacian_weighting=0.01,
              anisotropic_scaling=False,
          )
      mapfit = mapmod.fit(E)
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          radius_estimated = np.sqrt(1 / (np.pi * mapfit.rtap()))
      assert_almost_equal(radius_estimated, radius_gt, 4)
  
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 19 for calling a global function with example usage: test_estimate_radius_with_rtap(radius_gt) without return types