code: def test_plus_constraint(radial_order=6, rng=None):
      gtab = get_gtab_taiwan_dsi()
      l1, l2, l3 = [0.0015, 0.0003, 0.0003]
      S, _ = generate_signal_crossing(gtab, l1, l2, l3, angle2=60)
      S_noise = add_noise(S, snr=20, S0=100.0, rng=rng)
  
      gridsize = 50
      max_radius = 25e-3  # 25 microns maximum radius
      r_grad = mapmri.create_rspace(gridsize, max_radius)
  
      # The positivity constraint should make the pdf positive everywhere
      mapmod_constraint = MapmriModel(
          gtab,
          radial_order=radial_order,
          laplacian_regularization=False,
          positivity_constraint=True,
          global_constraints=True,
      )
      mapfit_constraint = mapmod_constraint.fit(S_noise)
      pdf = mapfit_constraint.pdf(r_grad)
      pdf_negative_constraint = pdf[pdf < 0].sum()
  
      assert_equal(pdf_negative_constraint == 0.0, True)
  
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 21 for calling a global function with example usage: test_plus_constraint(radial_order, rng) without return types