code: def unpack_trainable_vars(x, trainable_vars):
      """
      Unpack trainable vars from a single vector as
      used/returned by scipy.optimize
      """
  
      sizes = [tv.shape for tv in trainable_vars]
      idxs = [np.prod(sz) for sz in sizes]
      flatvars = tf.split(x, idxs)
      return [
          tf.reshape(fv, tv.shape)
          for fv, tv in zip(flatvars, trainable_vars)
      ]
  
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 8 for calling a global function with example usage: unpack_trainable_vars(x, trainable_vars) and returns: unknown