code: def to_path(X, dirpath):
      """
      Save list of list of array to path and returns the path_like array
      Parameters
      ----------
      X: list of list of array
          input data
      dirpath: str
          dirpath
      Returns
      -------
      paths: array of str
          path arrays where all data are stored
      """
      paths = []
      for i, sessions in enumerate(X):
          sessions_path = []
          for j, session in enumerate(sessions):
              pth = "%i_%i" % (i, j)
              np.save(os.path.join(dirpath, pth), session)
              sessions_path.append(os.path.join(dirpath, pth + ".npy"))
          paths.append(sessions_path)
      return np.array(paths)
  
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 1 for calling a global function with example usage: to_path(X, dirpath) and returns: np