code: def test_permuted_ols_nocovar_multivariate(rng):
      """Test permuted_ols with multiple tested variates and no covariate.
  
      It is equivalent to fitting several models with only one tested variate.
      """
      n_descriptors = 10
      n_regressors = 2
      target_vars, tested_var, *_ = _create_design(
          rng,
          n_samples=N_SAMPLES,
          n_descriptors=n_descriptors,
          n_regressors=n_regressors,
      )
  
      n_perm = N_PERM
      output = permuted_ols(
          tested_var,
          target_vars,
          model_intercept=False,
          n_perm=n_perm,
          random_state=0,
          output_type="dict",
      )
  
      compare_to_ref_score(output["t"], tested_var, target_vars)
  
      assert output["logp_max_t"].shape == (n_regressors, n_descriptors)
      assert output["h0_max_t"].shape == (n_regressors, n_perm)
  
      # Adds intercept (should be equivalent to centering variates)
      output_intercept = permuted_ols(
          tested_var,
          target_vars,
          model_intercept=True,
          n_perm=0,
          random_state=0,
          output_type="dict",
      )
  
      target_vars -= target_vars.mean(0)
      tested_var -= tested_var.mean(0)
      compare_to_ref_score(
          output_intercept["t"],
          tested_var,
          target_vars,
          np.ones((N_SAMPLES, 1)),
      )
  
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 29 for calling a global function with example usage: test_permuted_ols_nocovar_multivariate(rng) without return types