code: def pack_trainable_vars(trainable_vars):
      """
      Pack trainable vars in a model into a single
      vector that can be passed to scipy.optimize
      """
      return tf.concat(
          [tf.reshape(tv, (-1,)) for tv in trainable_vars], axis=0
      )
  
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 7 for calling a global function with example usage: pack_trainable_vars(trainable_vars) and returns: tf