code: def assign_params_from_flat(x, params):
      flat_size = lambda p: int(
          np.prod(p.shape.as_list())
      )  # the 'int' is important for scalars
      splits = tf.split(x, [flat_size(p) for p in params])
      new_params = [
          tf.reshape(p_new, p.shape) for p, p_new in zip(params, splits)
      ]
      return tf.group(
          [tf.assign(p, p_new) for p, p_new in zip(params, new_params)]
      )
  
imports: import numpy
  import tensorflow
  import scipy.signal
  from gym.spaces import Box, Discrete
label_desc: Use image node_id 17 for calling a global function with example usage: assign_params_from_flat(x, params) and returns: tf