code: def test_issorted(method):
      # test that is_sorted keyword works correctly
      # the fdrcorrection functions are tested indirectly
  
      # data generated as random numbers np.random.beta(0.2, 0.5, size=10)
      pvals = (
          np.array(
              [
                  31,
                  9958111,
                  7430818,
                  8653643,
                  9892855,
                  876,
                  2651691,
                  145836,
                  9931,
                  6174747,
              ]
          )
          * 1e-7
      )
      sortind = np.argsort(pvals)
      sortrevind = sortind.argsort()
      pvals_sorted = pvals[sortind]
  
      res1 = multipletests(pvals, method=method, is_sorted=False)
      res2 = multipletests(pvals_sorted, method=method, is_sorted=True)
      assert_equal(res2[0][sortrevind], res1[0])
      assert_allclose(res2[0][sortrevind], res1[0], rtol=1e-10)
  
imports: import pytest
  import numpy
  from numpy.testing import assert_almost_equal, assert_equal, assert_allclose
  from statsmodels.stats.multitest import multipletests, fdrcorrection, fdrcorrection_twostage, NullDistribution, local_fdr, multitest_methods_names
  from statsmodels.stats.multicomp import tukeyhsd
  from scipy.stats.distributions import norm
  import scipy
  from packaging import version
label_desc: Use image node_id 5 for calling a global function with example usage: test_issorted(method) without return types