code: def fast_srm(
      reduced_data_list,
      n_iter=10,
      n_components=None,
      low_ram=False,
      seed=0,
  ):
      """Computes shared response and basis in reduced space
  
      Parameters
      ----------
  
      reduced_data_list : array, shape=[n_subjects, n_sessions]
      or array, shape=[n_subjects, n_sessions, n_timeframes, n_supervoxels]
          Element i, j of the array is a path to the data of subject i
          collected during session j.
          Data are loaded with numpy.load and expected
          shape is [n_timeframes, n_supervoxels]
          or Element i, j of the array is the data in array of
          shape=[n_timeframes, n_supervoxels]
          n_timeframes and n_supervoxels are
           assumed to be the same across subjects
          n_timeframes can vary across sessions
          Each voxel's timecourse is assumed to have mean 0 and variance 1
  
      n_iter : int
          Number of iterations performed
  
      n_components : int or None
          number of components
  
      Returns
      -------
  
      shared_response_list : list of array, element i has
       shape=[n_timeframes, n_components]
          shared response, element i is the shared response during session i
      """
      if low_ram:
          return lowram_srm(reduced_data_list, n_iter, n_components)
      else:
          # We need to switch data to DetSRM format
          # Indeed in DetSRM all sessions are concatenated.
          # Whereas in FastSRM multiple sessions are supported.
  
          n_subjects, n_sessions = reduced_data_list.shape[:2]
          # We store the correspondence between timeframes and session
          timeframes_slices = []
          current_j = 0
          for j in range(n_sessions):
              timeframes_slices.append(
                  slice(
                      current_j,
                      current_j + len(reduced_data_list[0, j]),
                  )
              )
              current_j += len(reduced_data_list[0][j])
          # Now we can concatenate everything
          X = [
              np.concatenate(reduced_data_list[i], axis=0).T
              for i in range(n_subjects)
          ]
  
          srm = DetSRM(
              n_iter=n_iter, features=n_components, rand_seed=seed
          )
          srm.fit(X)
  
          # SRM gives a list of data projected in shared space
          # we get the shared response by averaging those
          concatenated_s = np.mean(srm.transform(X), axis=0).T
  
          # Let us return the shared response sliced by sessions
          return [concatenated_s[i] for i in timeframes_slices]
  
imports: import hashlib
  import logging
  import os
  import numpy
  import scipy
  from joblib import Parallel, delayed
  from brainiak.funcalign.srm import DetSRM
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.exceptions import NotFittedError
  import uuid
label_desc: Use image node_id 29 for calling a global function with example usage: fast_srm(reduced_data_list, n_iter, n_components, low_ram, seed) and returns: lowram_srm, unknown