code: def make_run_config():
      """Makes a RunConfig object with FLAGS.
  
      Returns:
        tf.estimator.RunConfig.
      Raises:
        ValueError: If not exactly one of `save_checkpoints_secs` and
          `save_checkpoints_steps` is specified.
      """
      save_checkpoints_secs = FLAGS.save_checkpoints_secs or None
      save_checkpoints_steps = FLAGS.save_checkpoints_steps or None
      if save_checkpoints_secs and save_checkpoints_steps:
          raise ValueError(
              "save_checkpoints_secs and save_checkpoints_steps "
              "cannot both be non-zero."
          )
      if not (save_checkpoints_secs or save_checkpoints_steps):
          raise ValueError(
              "save_checkpoints_secs and save_checkpoints_steps "
              "cannot both be zero."
          )
  
      # An error is thrown by absl.flags if train.sh passes tf_random_seed=None, so
      # it passes -1 instead.
      if FLAGS.tf_random_seed == -1:
          tf_random_seed = None
      else:
          tf_random_seed = FLAGS.tf_random_seed
  
      return tf.estimator.RunConfig(
          save_summary_steps=FLAGS.save_summary_steps,
          model_dir=FLAGS.model_dir,
          save_checkpoints_secs=save_checkpoints_secs,
          save_checkpoints_steps=save_checkpoints_steps,
          keep_checkpoint_max=FLAGS.keep_checkpoint_max,
          tf_random_seed=tf_random_seed,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl import flags
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: make_run_config() and returns: tf