docstr: Saves model to checkpoint name, retrieves embedding variables.
docstr_tok: ["Saves","model","to","checkpoint","name",",","retrieves","embedding","variables","."]
code: def make_checkpoint_and_get_embedding(self, name, model, num_rows):
      """Saves model to checkpoint name, retrieves embedding variables."""
      checkpoint = util.Checkpoint(model=model)
      checkpoint.save(self._get_tmpdir(name, "save"))
  
      # Get the name of the table video variable which should be the only
      # [8, 4] shaped tensor in the checkpoint. Note that we do this
      # as the key can change.
      variables = checkpoint_utils.list_variables(
          self._get_tmpdir(name)
      )
      variables = [
          name for name, size in variables if size == [num_rows, 4]
      ]
      if len(variables) != 1:
          raise RuntimeError(
              "Found {} copies of the parameter variable in the "
              "checkpoint. Exactly one copy exported.".format(
                  len(variables)
              )
          )
      return checkpoint_utils.load_variable(
          self._get_tmpdir(name), variables[0]
      )
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.distribute.cluster_resolver import tpu_cluster_resolver
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.module import module
  from tensorflow.python.ops import init_ops_v2
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import save
  from tensorflow.python.tpu import tpu_embedding_for_serving
  from tensorflow.python.tpu import tpu_embedding_v2
  from tensorflow.python.tpu import tpu_embedding_v2_utils
  from tensorflow.python.tpu.tests import tpu_embedding_base_test
  from tensorflow.python.training import checkpoint_utils
label_desc: Use image node_id 1 for calling the TPUEmbeddingCheckpointTest obj's underlying member method code with example usage: obj.make_checkpoint_and_get_embedding(name, model, num_rows) and returns: checkpoint_utils