code: def apply_input_format(X, input_format):
      if input_format == "array":
          n_sessions = len(X[0])
          XX = [
              [np.load(X[i, j]) for j in range(len(X[i]))]
              for i in range(len(X))
          ]
      elif input_format == "list_of_array":
          XX = [[x] for x in X]
          n_sessions = 1
      else:
          XX = X
          n_sessions = len(X[0])
      return XX, n_sessions
  
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 14 for calling a global function with example usage: apply_input_format(X, input_format) and returns: XX,  n_sessions