code: def testReturnsScores(self):
      model, features = get_model(
          mode=tf_estimator.ModeKeys.PREDICT,
          model_cls=transformer.TransformerScorer,
      )
      infer_out = model.infer(features)
      self.assertTrue("outputs" in infer_out)
      self.assertTrue("scores" in infer_out)
  
      with self.test_session() as session:
          session.run(tf.global_variables_initializer())
          infer_out = session.run(infer_out)
          self.assertEqual((BATCH_SIZE,), infer_out["scores"].shape)
          self.assertEqual(
              (BATCH_SIZE, TARGET_LENGTH), infer_out["outputs"].shape
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.data_generators import librispeech
  from tensor2tensor.data_generators import problem_hparams
  from tensor2tensor.models import transformer
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 1 for calling the TransformerScorerTest obj's underlying member method code with example usage: obj.testReturnsScores() without return types