code: def test_viterbi_in_exp_space(self):
      scores = np.array(
          [[10.0, 12.0, 6.0, 4.0], [13.0, 12.0, 11.0, 10.0]]
      )
      x = 0.0
      # pyformat: disable
      # pylint: disable=bad-whitespace
      # pylint: disable=bad-continuation
      transition_params = np.array(
          [
              [0.1, 0.2, 0.3, 0.4],
              [0.5, 0.6, 0.7, 0.8],
              [0.9, x, 0.15, x],
              [0.25, 0.35, 0.45, 0.55],
          ]
      )
      # pyformat: enable
      # pylint: enable=bad-whitespace
      # pylint: enable=bad-continuation
  
      # STEP 1:
      #   Starting scores are {10.0, 12.0, 6.0, 4.0}
      #   Raw scores are: {13.0, 12.0, 11.0, 10.0}
      #
      # Final state 0: (13.0) Weighted scores are {1.3, 6.5, 11.7, 3.25}
      #      New totals are {13, 78, 70.2, 13} [max 78 from 1]
      #
      # Final state 1: (12.0) Weighted scores are {2.4, 7.2, 0, 4.2},
      #      New totals are {24, 86.4, 0, 16.8} [max 86.4 from 1]
      #
      # Final state 2: (11.0) Weighted scores are {3.3, 7.7, 1.65, 4.95},
      #      New totals are {33, 92.4, 9.9, 19.8} [max 92.4 from 1]
      #
      # Final state 3: (10.0) Weighted scores are {4, 8, 0, 5.5},
      #      New totals are {40, 96, 0, 22} [max 96 from 1]
      #
      #   Top scores are [78, 86.4, 92.4, 96] from [1, 1, 1, 1].
      #   Final state is [3] with a sequence of [1->3].
  
      sequence, score = viterbi_decode.decode(
          scores, transition_params, use_log_space=False
      )
      self.assertAlmostEqual(96.0, score)
      self.assertEqual([1, 3], sequence)
  
file_path: text/tensorflow_text/python/numpy/viterbi_decode_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import absltest
  import numpy
  from tensorflow_text.python.numpy import viterbi_decode
label_desc: Use image node_id 4 for calling the ViterbiDecodeTest obj's underlying member method code with example usage: obj.test_viterbi_in_exp_space() without return types