code: def test_null_to_p_array(rng):
      """Test null_to_p with 1d array input."""
      N = 10000
      nulldist = rng.normal(size=N)
      t = np.sort(rng.normal(size=N))
      p = np.sort(_utils.null_to_p(t, nulldist))
  
      assert p.shape == (N,)
      assert (p < 1).all()
      assert (p > 0).all()
  
      # Resulting distribution should be roughly uniform
      assert np.abs(p.mean() - 0.5) < 0.02
      assert np.abs(p.var() - 1 / 12) < 0.02
  
imports: import math
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from scipy.ndimage import generate_binary_structure
  from nilearn.mass_univariate import _utils
  from nilearn.mass_univariate.tests._testing import get_tvalue_with_alternative_library
label_desc: Use image node_id 9 for calling a global function with example usage: test_null_to_p_array(rng) without return types