code: def generate_fake_fmri_data(shapes, rk=3, affine=np.eye(4)):
      fmri_data = []
      design_matrices = []
      for i, shape in enumerate(shapes):
          data = 100 + np.random.randn(*shape)
          data[0] -= 10
          fmri_data.append(Nifti1Image(data, affine))
          design_matrices.append(np.random.randn(shape[3], rk))
      mask = Nifti1Image(
          (np.random.rand(*shape[:3]) > 0.5).astype(np.int8), affine
      )
      return mask, fmri_data, design_matrices
  
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 2 for calling a global function with example usage: generate_fake_fmri_data(shapes, rk, affine) and returns: mask,  fmri_data,  design_matrices