code: def test_twosample_poisson_diff(case):
      # testing against two examples Ng et al 2007
      # methods_diff = ["wald", "score", "etest-wald", "etest"]
  
      meth, res1, res2 = case
      count1, exposure1, count2, exposure2 = 41, 28010, 15, 19017
  
      value = 0
      t = smr.test_poisson_2indep(
          count1,
          exposure1,
          count2,
          exposure2,
          value=value,
          method=meth,
          compare="diff",
          alternative="larger",
          etest_kwds=None,
      )
      assert_allclose((t.statistic, t.pvalue), res1, atol=0.0006)
  
      value = 0.0002
      t = smr.test_poisson_2indep(
          count1,
          exposure1,
          count2,
          exposure2,
          value=value,
          method=meth,
          compare="diff",
          alternative="larger",
          etest_kwds=None,
      )
      assert_allclose((t.statistic, t.pvalue), res2, atol=0.0007)
  
imports: import pytest
  import warnings
  import numpy
  from numpy import arange
  from numpy.testing import assert_allclose, assert_equal
  from scipy import stats
  import statsmodels.stats.rates
  from statsmodels.stats.rates import confint_poisson, tolerance_int_poisson, confint_quantile_poisson, etest_poisson_2indep, confint_poisson_2indep, nonequivalence_poisson_2indep, power_poisson_ratio_2indep, power_equivalence_poisson_2indep, power_poisson_diff_2indep, power_equivalence_neginb_2indep, power_negbin_ratio_2indep, method_names_poisson_1samp, method_names_poisson_2indep
label_desc: Use image node_id 8 for calling a global function with example usage: test_twosample_poisson_diff(case) without return types