code: def assign_from_values_fn(var_names_to_values):
      """Returns a function that assigns specific variables from the given values.
  
      This function provides a mechanism for performing assignment of variables
      to values in a way that does not fill the graph with large assignment values.
  
      Args:
        var_names_to_values: A map from variable names to values.
  
      Returns:
        A function that takes a single argument, a `tf.compat.v1.Session`, that
        applies the
        assignment operation.
  
      Raises:
        ValueError: if any of the given variable names were not found.
      """
      assign_op, feed_dict = assign_from_values(var_names_to_values)
  
      def callback(session):
          return session.run(assign_op, feed_dict)
  
      return callback
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import re
  from .arg_scope import add_arg_scope
  from tensorflow.core.protobuf import saver_pb2
  from tensorflow.python import pywrap_tensorflow
  from tensorflow.python.framework import device
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import resource_loader
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.training import saver
  from tensorflow.python.training import training_util
  from tensorflow.python.util.deprecation import deprecated
label_desc: Use image node_id 20 for calling a global function with example usage: assign_from_values_fn(var_names_to_values) and returns: callback, session