code: def test_two_level_glm():
      nsub = 10
      npts = 100
      reg1 = np.ones(nsub)
      reg2 = np.random.random(nsub)
      X = np.array((reg1, reg2)).T
      y = np.repeat(np.reshape(reg1 + reg2, (nsub, 1)), npts, axis=1)
      vy = np.zeros((nsub, npts))
      beta, s2, dof = two_level_glm(y, vy, X)
      assert_array_almost_equal(beta, 1)
      assert_array_almost_equal(s2, 0)
  
file_path: nipy/nipy/algorithms/statistics/tests/test_mixed_effects.py
imports: import numpy
  import numpy.random
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_almost_equal
  from ..bayesian_mixed_effects import two_level_glm
  from ..mixed_effects_stat import generate_data, mfx_stat, one_sample_ftest, one_sample_ttest, t_stat, two_sample_ftest, two_sample_ttest
label_desc: Use image node_id 7 for calling a global function with example usage: test_two_level_glm() without return types