class_docstr: Tests the length normalization score
code: def test_length_norm(self):
      # log_probs_ = np.ones([2, 3]) / 3.0
      lengths_ = np.array([[1, 2, 3], [3, 3, 3]])
      penalty_factor_ = 0.6
      length_pen = beam_search.length_penalty(
          sequence_lengths=tf.convert_to_tensor(lengths_),
          penalty_factor=penalty_factor_,
      )
  
      with self.test_session() as sess:
          length_pen_ = sess.run(length_pen)
  
      np.testing.assert_almost_equal(length_pen_[0, 0], 1.0, decimal=5)
      np.testing.assert_almost_equal(
          length_pen_[0, 1], 1.0969027, decimal=4
      )
      np.testing.assert_almost_equal(
          length_pen_[0, 2], 1.1884017, decimal=4
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import tensorflow
  import numpy
  from seq2seq.inference import beam_search
label_desc: Use image node_id 1 for calling the TestLengthNorm obj's underlying member method code with example usage: obj.test_length_norm() without return types