code: def set_value(var, value, session=None):
      """set_value.
  
      Set a variable's value. If no session provided, use default one.
  
      Arguments:
          var: `Variable`. The variable to assign a value.
          value: The value to assign. Must be compatible with variable dtype.
          session: `Session`. The session to perform the assignation.
              Default: the default session.
  
      """
      op = tf.assign(var, value=value)
      if not session:
          session = tf.get_default_session()
      return op.eval(session=session)
  
file_path: tflearn/tflearn/variables.py
imports: from __future__ import division, print_function, absolute_import
  import tensorflow.compat.v1
  import tflearn
  from tflearn.vendor.arg_scope import add_arg_scope
label_desc: Use image node_id 7 for calling a global function with example usage: set_value(var, value, session) and returns: op