code: def test_fdr(rng):
      n = 100
      x = np.linspace(0.5 / n, 1.0 - 0.5 / n, n)
      x[:10] = 0.0005
      x = norm.isf(x)
      rng.shuffle(x)
  
      assert_almost_equal(fdr_threshold(x, 0.1), norm.isf(0.0005))
      assert fdr_threshold(x, 0.001) == np.inf
  
      # addresses #2879
      n = 10
      pvals = np.linspace(1 / n, 1, n)
      pvals[0] = 0.007
  
      assert np.isfinite(fdr_threshold(norm.isf(pvals), 0.1))
  
imports: import numpy
  import pytest
  from nibabel import Nifti1Image
  from numpy.testing import assert_almost_equal, assert_equal
  from scipy.stats import norm
  from nilearn.conftest import _shape_3d_default
  from nilearn.glm import cluster_level_inference, fdr_threshold, threshold_stats_img
  from nilearn.glm.thresholding import _compute_hommel_value
  from nilearn.image import get_data
label_desc: Use image node_id 1 for calling a global function with example usage: test_fdr(rng) without return types