code: def _compute_shared_response_online_single(
      subjects, basis_list, temp_dir, subjects_indexes, aggregate
  ):
      """Computes shared response during one session with basis fixed
  
      Parameters
      ----------
  
      subjects : array of str
          Element i of the array is a path to the data of subject i.
          Data are loaded with numpy.load and expected shape is
           [n_timeframes, n_voxels]
          n_timeframes and n_voxels 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
  
      basis_list : None or list of array, element i has
      shape=[n_components, n_voxels]
          basis of all subjects, element i is the basis of subject i
  
      temp_dir : None or str
          path to basis folder where file basis_%i.npy contains the basis of
          subject i
  
      subjects_indexes : list of int or None
          list of indexes corresponding to the subjects to use to compute
          shared response
  
      aggregate: str or None, default="mean"
          if "mean": returns the mean shared response S from all subjects
          if None: returns the subject-specific response in shared space S_i
  
      Returns
      -------
  
      shared_response : array, shape=[n_timeframes, n_components] or list
          shared response
      """
      n = 0
      if aggregate == "mean":
          shared_response = None
      if aggregate is None:
          shared_response = []
  
      for k, i in enumerate(subjects_indexes):
          subject = subjects[k]
          # Transpose to be consistent with paper
          data = safe_load(subject).T
          if temp_dir is None:
              basis_i = basis_list[i]
          else:
              basis_i = np.load(
                  os.path.join(temp_dir, "basis_%i.npy" % i)
              )
  
          if aggregate == "mean":
              if shared_response is None:
                  shared_response = data.dot(basis_i.T)
              else:
                  shared_response += data.dot(basis_i.T)
              n += 1
  
          if aggregate is None:
              shared_response.append(data.dot(basis_i.T))
  
      if aggregate is None:
          return shared_response
  
      if aggregate == "mean":
          return shared_response / float(n)
  
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 32 for calling a global function with example usage: _compute_shared_response_online_single(subjects, basis_list, temp_dir, subjects_indexes, aggregate) and returns: shared_response, unknown