code: def test_contrast_values(set_up_glm, rng):
      # but this test is circular and should be removed
      labels, results, q = set_up_glm(rng, "ar1", bins=1)
  
      # t test
      cval = np.eye(q)[0]
      con = compute_contrast(labels, results, cval)
      t_ref = list(results.values())[0].Tcontrast(cval).t
  
      assert_almost_equal(np.ravel(con.stat()), t_ref)
  
      # F test
      cval = np.eye(q)[:3]
      con = compute_contrast(labels, results, cval)
      F_ref = list(results.values())[0].Fcontrast(cval).F
  
      # Note that the values are not strictly equal,
      # this seems to be related to a bug in Mahalanobis
      assert_almost_equal(np.ravel(con.stat()), F_ref, 3)
  
imports: import numpy
  import pytest
  import scipy.stats
  from numpy.testing import assert_almost_equal
  from sklearn.datasets import make_regression
  from sklearn.linear_model import LinearRegression
  from nilearn.glm.contrasts import Contrast, _compute_fixed_effects_params, compute_contrast, compute_fixed_effect_contrast, expression_to_contrast_vector
  from nilearn.glm.first_level import run_glm
label_desc: Use image node_id 12 for calling a global function with example usage: test_contrast_values(set_up_glm, rng) without return types