docstr: Creates checkpoints for previous trials and returns num created.
docstr_tok: ["Creates","checkpoints","for","previous","trials","and","returns","num","created","."]
code: def _create_previous_trials(self, root_dir, shapes, dtypes, values):
      """Creates checkpoints for previous trials and returns num created."""
      assert len(shapes) == len(dtypes) == len(values)
  
      for i, (shape, dtype, value) in enumerate(
          zip(shapes, dtypes, values)
      ):
          with self.test_session(graph=tf.Graph()) as sess:
              var = tf.compat.v1.get_variable(
                  "var",
                  shape=shape,
                  dtype=dtype,
                  initializer=tf.compat.v1.zeros_initializer,
              )
              var = var.assign(value)
              saver = tf.compat.v1.train.Saver()
              sess.run(tf.compat.v1.global_variables_initializer())
              sess.run(var)
              saver.save(sess, "{}/{}/ckpt".format(root_dir, i))
      return len(shapes)
  
file_path: model_search/model_search/meta/transfer_learning_test.py
imports: import os
  from absl.testing import parameterized
  from model_search import test_utils
  from model_search.meta import transfer_learning
  from model_search.metadata import trial
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling the TransferLearningTest obj's underlying member method code with example usage: obj._create_previous_trials(root_dir, shapes, dtypes, values) and returns: len