code: def test_fastsrm_identity():
      # In this function we test whether fastsrm and DetSRM have
      # identical behavior when atlas=None
  
      # We authorize different timeframes for different sessions
      # but they should be the same across subject
      n_voxels = 8
      n_timeframes = [4, 5, 6]
      n_subjects = 2
      n_components = 3  # number of components used for SRM model
  
      np.random.seed(0)
      paths, W, S = generate_data(
          n_voxels,
          n_timeframes,
          n_subjects,
          n_components,
          None,
          input_format="list_of_array",
      )
  
      # Test if generated data has the good shape
      for subject in range(n_subjects):
          assert paths[subject].shape == (
              n_voxels,
              np.sum([n_timeframes]),
          )
  
      srm = DetSRM(n_iter=11, features=3, rand_seed=0)
      srm.fit(paths)
      shared = srm.transform(paths)
  
      fastsrm = FastSRM(
          atlas=None,
          n_components=3,
          verbose=True,
          seed=0,
          n_jobs=1,
          n_iter=10,
      )
      fastsrm.fit(paths)
      shared_fast = fastsrm.transform(paths)
  
      assert_array_almost_equal(shared_fast, np.mean(shared, axis=0))
  
      for i in range(n_subjects):
          assert_array_almost_equal(
              safe_load(fastsrm.basis_list[i]), srm.w_[i].T
          )
  
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 17 for calling a global function with example usage: test_fastsrm_identity() without return types