code: def bootstrap():
      
      # a bit hacky - forge an initial checkpoint with the name that subsequent
      # Estimator runs will expect to find.
      #
      # Estimator will do this automatically when you call train(), but calling
      # train() requires data, and I didn't feel like creating training data in
      # order to run the full train pipeline for 1 step.
      maybe_set_seed()
      initial_checkpoint_name = 'model.ckpt-1'
      save_file = os.path.join(FLAGS.work_dir, initial_checkpoint_name)
      sess = tf.Session(graph=tf.Graph())
      with sess.graph.as_default():
          features, labels = get_inference_input()
          model_fn(features, labels, tf.estimator.ModeKeys.PREDICT,
                   params=FLAGS.flag_values_dict())
          sess.run(tf.global_variables_initializer())
          tf.train.Saver().save(sess, save_file)
docs: Initialize a tf.Estimator run with random initial weights.