class_docstr: Groupwise RankingEstimator tests.
docstr: Assert the values and shapes of the variables saved in the checkpoint.
docstr_tok: ["Assert","the","values","and","shapes","of","the","variables","saved","in","the","checkpoint","."]
code: def _assert_checkpoint(
      self,
      expected_global_step,
      expected_weights=None,
      expected_bias=None,
  ):
      """Assert the values and shapes of the variables saved in the checkpoint."""
      shapes = {
          name: shape
          for (name, shape) in tf.train.list_variables(self._model_dir)
      }
  
      reader = tf.train.load_checkpoint(self._model_dir)
  
      self.assertEqual([], shapes[tf.compat.v1.GraphKeys.GLOBAL_STEP])
      self.assertEqual(
          expected_global_step,
          reader.get_tensor(tf.compat.v1.GraphKeys.GLOBAL_STEP),
      )
  
      self.assertEqual([3, 2], shapes[WEIGHTS_NAME])
      if expected_weights is not None:
          self.assertAllClose(
              expected_weights, reader.get_tensor(WEIGHTS_NAME)
          )
  
      self.assertEqual([2], shapes[BIAS_NAME])
      if expected_bias is not None:
          self.assertAllClose(
              expected_bias, reader.get_tensor(BIAS_NAME)
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl.testing import parameterized
  import tensorflow
  from tensorflow import estimator
  from tensorflow_ranking.python import feature
  from tensorflow_ranking.python import head
  from tensorflow_ranking.python import losses
  from tensorflow_ranking.python import model
label_desc: Use image node_id 3 for calling the GroupwiseRankingEstimatorTest obj's underlying member method code with example usage: obj._assert_checkpoint(expected_global_step, expected_weights, expected_bias) without return types