code: def test_nomodify_gh9900_regression():
      # Regression test for gh-9990
      # Prior to gh-9990, calls to stats.truncnorm._cdf() use what ever was
      # set inside the stats.truncnorm instance during stats.truncnorm.cdf().
      # This could cause issues with multi-threaded code.
      # Since then, the calls to cdf() are not permitted to modify the global
      # stats.truncnorm instance.
      tn = stats.truncnorm
      # Use the right-half truncated normal
      # Check that the cdf and _cdf return the same result.
      npt.assert_almost_equal(tn.cdf(1, 0, np.inf), 0.6826894921370859)
      npt.assert_almost_equal(
          tn._cdf([1], [0], [np.inf]), 0.6826894921370859
      )
  
      # Now use the left-half truncated normal
      npt.assert_almost_equal(
          tn.cdf(-1, -np.inf, 0), 0.31731050786291415
      )
      npt.assert_almost_equal(
          tn._cdf([-1], [-np.inf], [0]), 0.31731050786291415
      )
  
      # Check that the right-half truncated normal _cdf hasn't changed
      npt.assert_almost_equal(
          tn._cdf([1], [0], [np.inf]), 0.6826894921370859
      )  # Not 1.6826894921370859
      npt.assert_almost_equal(tn.cdf(1, 0, np.inf), 0.6826894921370859)
  
      # Check that the left-half truncated normal _cdf hasn't changed
      npt.assert_almost_equal(
          tn._cdf([-1], [-np.inf], [0]), 0.31731050786291415
      )  # Not -0.6826894921370859
      npt.assert_almost_equal(
          tn.cdf(1, -np.inf, 0), 1
      )  # Not 1.6826894921370859
      npt.assert_almost_equal(
          tn.cdf(-1, -np.inf, 0), 0.31731050786291415
      )
  
imports: import sys
  import numpy
  import numpy.testing
  import pytest
  from pytest import raises
  from scipy.integrate import IntegrationWarning
  import itertools
  from scipy import stats
  from .common_tests import check_normalization, check_moment, check_mean_expect, check_var_expect, check_skew_expect, check_kurt_expect, check_entropy, check_private_entropy, check_entropy_vect_scale, check_edge_support, check_named_args, check_random_state_property, check_meth_dtype, check_ppf_dtype, check_cmplx_deriv, check_pickling, check_rvs_broadcast, check_freezing, check_munp_expect
  from scipy.stats._distr_params import distcont
  from scipy.stats._distn_infrastructure import rv_continuous_frozen
label_desc: Use image node_id 10 for calling a global function with example usage: test_nomodify_gh9900_regression() without return types