code: def test_shore_positive_constrain():
      asm = ShoreModel(
          data.gtab,
          radial_order=data.radial_order,
          zeta=data.zeta,
          lambdaN=data.lambdaN,
          lambdaL=data.lambdaL,
          constrain_e0=True,
          positive_constraint=True,
          pos_grid=11,
          pos_radius=20e-03,
      )
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          asmfit = asm.fit(data.S)
          eap = asmfit.pdf_grid(11, 20e-03)
      npt.assert_almost_equal(eap[eap < 0].sum(), 0, 3)
  
file_path: dipy/dipy/reconst/tests/test_shore.py
imports: import warnings
  from math import factorial
  import numpy
  import numpy.testing
  from scipy.special import genlaguerre, gamma
  import pytest
  from dipy.data import get_gtab_taiwan_dsi
  from dipy.reconst.shm import descoteaux07_legacy_msg
  from dipy.reconst.shore import ShoreModel
  from dipy.sims.voxel import multi_tensor
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 3 for calling a global function with example usage: test_shore_positive_constrain() without return types