code: def from_sym_2_tri(symm):
      """convert a 2D symmetric matrix to an upper
         triangular matrix in 1D format
  
      Parameters
      ----------
  
      symm : 2D array
            Symmetric matrix
  
  
      Returns
      -------
  
      tri: 1D array
            Contains elements of upper triangular matrix
      """
  
      inds = np.triu_indices_from(symm)
      tri = symm[inds]
      return tri
  
imports: import numpy
  import re
  import warnings
  import os.path
  import psutil
  from .fmrisim import generate_stimfunction, _double_gamma_hrf, convolve_hrf
  from scipy.fftpack import fft, ifft
  import logging
label_desc: Use image node_id 3 for calling a global function with example usage: from_sym_2_tri(symm) and returns: tri