code: def local_params(htfa, n_timepoints):
      centers = [
          htfa.get_centers(x)
          for x in np.array_split(htfa.local_posterior_, htfa.n_subj)
      ]
      widths = [
          htfa.get_widths(x)
          for x in np.array_split(htfa.local_posterior_, htfa.n_subj)
      ]
  
      inds = np.hstack(
          [0, np.cumsum(np.multiply(htfa.K, n_timepoints))]
      )
      weights = [
          htfa.local_weights_[inds[i] : inds[i + 1]]
          .reshape([htfa.K, n_timepoints[i]])
          .T
          for i in np.arange(htfa.n_subj)
      ]
      return centers, widths, weights
  
imports: import numpy
  import pandas
  import nibabel
  import nilearn
  from nilearn.input_data import NiftiMasker
  import nilearn.plotting
  import matplotlib
  import matplotlib.pyplot
  import holoviews
  import timecorr
  import os
  from brainiak.factoranalysis.htfa import HTFA
  import warnings
  import seaborn
label_desc: Use image node_id 6 for calling a global function with example usage: local_params(htfa, n_timepoints) and returns: centers,  widths,  weights