code: def test_nhypergeom_pmfcdf():
      # test pmf and cdf with arbitrary values.
      M = 8
      n = 3
      r = 4
      support = np.arange(n + 1)
      pmf = nhypergeom.pmf(support, M, n, r)
      cdf = nhypergeom.cdf(support, M, n, r)
      assert_allclose(pmf, [1 / 14, 3 / 14, 5 / 14, 5 / 14], rtol=1e-13)
      assert_allclose(cdf, [1 / 14, 4 / 14, 9 / 14, 1.0], rtol=1e-13)
  
imports: import pytest
  from scipy.stats import betabinom, hypergeom, nhypergeom, bernoulli, boltzmann, skellam, zipf, zipfian, binom, nbinom, nchypergeom_fisher, nchypergeom_wallenius, randint
  import numpy
  from numpy.testing import assert_almost_equal, assert_equal, assert_allclose
  from scipy.special import binom
  import pytest
  from scipy.optimize import root_scalar
  from scipy.integrate import quad
label_desc: Use image node_id 3 for calling a global function with example usage: test_nhypergeom_pmfcdf() without return types