code: def _create_checkpoints(sess, checkpoint_dir):
      checkpoint_prefix = os.path.join(checkpoint_dir, "model")
      checkpoint_state_name = "checkpoint"
      v1 = variable_scope.get_variable("var1", [1, 10])
      v2 = variable_scope.get_variable("var2", [10, 10])
      v3 = variable_scope.get_variable("var3", [100, 100])
      with variable_scope.variable_scope("useful_scope"):
          v4 = variable_scope.get_variable("var4", [9, 9])
      sess.run(variables.global_variables_initializer())
      v1_value, v2_value, v3_value, v4_value = sess.run(
          [v1, v2, v3, v4]
      )
      saver = saver_lib.Saver()
      saver.save(
          sess,
          checkpoint_prefix,
          global_step=0,
          latest_filename=checkpoint_state_name,
      )
      return v1_value, v2_value, v3_value, v4_value
  
imports: import os
  import pathlib
  import time
  import numpy
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.client import session
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import partitioned_variables
  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 gfile
  from tensorflow.python.platform import test
  from tensorflow.python.training import checkpoint_utils
  from tensorflow.python.training import saver
label_desc: Use image node_id 1 for calling a global function with example usage: _create_checkpoints(sess, checkpoint_dir) and returns: v1_value,  v2_value,  v3_value,  v4_value