code: def test_F_contrast_add():
      mulm, n, p, q = ar1_glm()
      # first test with independent contrast
      c1, c2 = np.eye(q)[:2], np.eye(q)[2:4]
      con = mulm.contrast(c1) + mulm.contrast(c2)
      z_vals = con.z_score()
      assert_almost_equal(z_vals.mean(), 0, 0)
      assert_almost_equal(z_vals.std(), 1, 0)
      # first test with dependent contrast
      con1 = mulm.contrast(c1)
      con2 = mulm.contrast(c1) + mulm.contrast(c1)
      assert_almost_equal(con1.effect * 2, con2.effect)
      assert_almost_equal(con1.variance * 2, con2.variance)
      assert_almost_equal(con1.stat() * 2, con2.stat())
  
imports: import numpy
  import pytest
  from nibabel import Nifti1Image, load, save
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from nipy.io.nibcompat import get_affine
  from nipy.testing import funcfile
  from nipy.testing.decorators import if_example_data
  from ..glm import FMRILinearModel, GeneralLinearModel, data_scaling
label_desc: Use image node_id 20 for calling a global function with example usage: test_F_contrast_add() without return types