code: def plot_nodes(
      htfa,
      n_timepoints,
      cmap="Spectral",
      global_scale=100,
      local_scale=25,
  ):
      colors = np.repeat(
          np.vstack([[0, 0, 0], sns.color_palette(cmap, htfa.n_subj)]),
          htfa.K,
          axis=0,
      )
      colors = [
          colors[i, :] for i in range(colors.shape[0])
      ]  # make colors into a list
  
      global_centers, global_widths = global_params(htfa)
      local_centers, local_widths, _ = local_params(htfa, n_timepoints)
  
      centers = np.vstack([global_centers, np.vstack(local_centers)])
      widths = np.vstack([global_widths, np.vstack(local_widths)])
      widths /= np.max(widths)
  
      scales = np.repeat(
          np.hstack(
              [
                  np.array(global_scale),
                  np.array(htfa.n_subj * [local_scale]),
              ]
          ),
          htfa.K,
      )
      sizes = widths.T * scales
      return nl.plotting.plot_connectome(
          np.eye(htfa.K * (1 + htfa.n_subj)),
          centers,
          node_color=colors,
          node_size=sizes,
      )
  
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 7 for calling a global function with example usage: plot_nodes(htfa, n_timepoints, cmap, global_scale, local_scale) and returns: nl