code: def save(model, weights_path, sess):
      if sess is None:
          sess = tf.get_default_session()
          assert (
              sess is not None
          ), "The default session should be given."
  
      weights = get_weights(model)
      names = [w.name for w in weights]
      values = sess.run(weights)
      np.savez(weights_path, names=names, values=values)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  import warnings
  from contextlib import contextmanager
  from .version_utils import tf_later_than
label_desc: Use image node_id 13 for calling a global function with example usage: save(model, weights_path, sess) without return types