import tensorflow as tf


    if FLAGS.ckpt_no is not None and not tf.gfile.Exists(path_ckpt):
      with tf.gfile.GFile(path_ckpt, "w") as writer:
        writer.write('model_checkpoint_path: "%s-%s"\n' % (os.path.join(FLAGS.recover_dir, "model.ckpt"), str(FLAGS.ckpt_no)))
        writer.write('all_model_checkpoint_paths: "%s-%s"\n' % (os.path.join(FLAGS.recover_dir, "model.ckpt"), str(FLAGS.ckpt_no)))

    if FLAGS.ckpt_no_input is not None and not tf.gfile.Exists(path_ckpt_input):
      with tf.gfile.GFile(path_ckpt_input, "w") as writer:
        writer.write('model_checkpoint_path: "%s-%s"\n' % (os.path.join(FLAGS.recover_dir, "input.ckpt"), str(FLAGS.ckpt_no_input)))
        writer.write('all_model_checkpoint_paths: "%s-%s"\n' % (os.path.join(FLAGS.recover_dir, "input.ckpt"), str(FLAGS.ckpt_no_input)))

  if FLAGS.use_hvd and hvd.rank() == 0 and (FLAGS.do_train or FLAGS.do_train_eval):
