code: def test_tfce_smoke_legacy_smoke():
      (
          target_var,
          tested_var,
          masker,
          n_descriptors,
          n_regressors,
      ) = _tfce_design()
  
      # no permutations and output_type is "dict", so check for "t" and
      # "tfce" maps
      out = permuted_ols(
          tested_var,
          target_var,
          model_intercept=False,
          two_sided_test=False,
          n_perm=0,
          random_state=0,
          masker=masker,
          tfce=True,
          output_type="dict",
      )
  
      assert isinstance(out, dict)
      assert "t" in out.keys()
      assert "tfce" in out.keys()
      assert out["t"].shape == (n_regressors, n_descriptors)
      assert out["tfce"].shape == (n_regressors, n_descriptors)
  
      # permutations, TFCE, and masker are defined,
      # so check for TFCE maps
      n_perm = N_PERM
      out = permuted_ols(
          tested_var,
          target_var,
          model_intercept=False,
          two_sided_test=False,
          n_perm=n_perm,
          random_state=0,
          masker=masker,
          tfce=True,
          output_type="dict",
      )
  
      assert isinstance(out, dict)
      assert "t" in out.keys()
      assert "tfce" in out.keys()
      assert "logp_max_t" in out.keys()
      assert "logp_max_tfce" in out.keys()
      assert "h0_max_t" in out.keys()
      assert "h0_max_tfce" in out.keys()
      assert out["t"].shape == (n_regressors, n_descriptors)
      assert out["tfce"].shape == (n_regressors, n_descriptors)
      assert out["logp_max_t"].shape == (n_regressors, n_descriptors)
      assert out["logp_max_tfce"].shape == (n_regressors, n_descriptors)
      assert out["h0_max_t"].size == n_perm
      assert out["h0_max_tfce"].size == n_perm
  
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 36 for calling a global function with example usage: test_tfce_smoke_legacy_smoke() without return types