code: def check_ktest_p_values_distribution_and_mse(
      all_kstest_pvals, all_mse
  ):
      # check that a difference between distributions is not rejected by KS test
      all_kstest_pvals = np.array(all_kstest_pvals).reshape(
          (len(PERM_RANGES), -1)
      )
      assert_array_less(0.01, all_kstest_pvals)
  
      # consistency of the algorithm: the more permutations, the less the MSE
      all_mse = np.array(all_mse).reshape((len(PERM_RANGES), -1))
      assert_array_less(np.diff(all_mse.mean(1)), 0)
  
imports: import nibabel
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_less, assert_equal
  from scipy import stats
  from nilearn.conftest import _rng
  from nilearn.maskers import NiftiMasker
  from nilearn.mass_univariate import permuted_ols
label_desc: Use image node_id 15 for calling a global function with example usage: check_ktest_p_values_distribution_and_mse(all_kstest_pvals, all_mse) without return types