code: def test_compute_and_save():
      with tempfile.TemporaryDirectory() as datadir:
          np.random.seed(0)
          n_voxels = 10
          n_timeframes = [25, 24]
          n_subjects = 5
          n_components = 3  # number of components used for SRM model
  
          paths, W, S = generate_data(
              n_voxels,
              n_timeframes,
              n_subjects,
              n_components,
              datadir,
              0,
          )
  
          for m, subjects in enumerate(paths.T):
              for subject in subjects:
                  _compute_and_save_corr_mat(subject, S[m].T, datadir)
  
          for i, sessions in enumerate(paths):
              basis = _compute_and_save_subject_basis(
                  i, sessions, datadir
              )
  
              assert_array_almost_equal(np.load(basis), W[i], 3)
  
imports: import os
  import tempfile
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from sklearn.exceptions import NotFittedError
  from brainiak.funcalign.fastsrm import FastSRM, _compute_and_save_corr_mat, _compute_and_save_subject_basis, _compute_basis_subject_online, _reduced_space_compute_shared_response, check_atlas, check_imgs, check_shared_response, create_temp_dir, fast_srm, reduce_data, safe_load
  from brainiak.funcalign.srm import DetSRM
label_desc: Use image node_id 11 for calling a global function with example usage: test_compute_and_save() without return types