code: def flatten_cholesky_unique(L):
      """
      Flattens nonzero-elements Cholesky (triangular) factor
      into a vector, and logs diagonal to make parameterization
      unique. Inverse of unflatten_cholesky_unique.
      """
      L_tf = tf.linalg.set_diag(L, tf.math.log(tf.linalg.diag_part(L)))
      L_flat = tfp.math.fill_triangular_inverse(L_tf)
      return L_flat
  
file_path: brainiak/brainiak/matnormal/utils.py
imports: import tensorflow
  import tensorflow_probability
  from scipy.stats import norm
  from numpy.linalg import cholesky
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: flatten_cholesky_unique(L) and returns: L_flat