code: def test_sequence_in_log_space_with_start_end_states_multi_input(
      self,
  ):
      use_log_space = True
      use_start_and_end_states = True
      scores = np.array(
          [[10.0, 12.0, 7.0, 4.0], [13.0, 12.0, 11.0, 10.0]]
      )
      # pyformat: disable
      # pylint: disable=bad-whitespace
      # pylint: disable=bad-continuation
      transition_weights = np.array(
          [
              [-1.0, 1.0, -2.0, 2.0, 0.0],
              [3.0, -3.0, 4.0, -4.0, 0.0],
              [5.0, 1.0, 10.0, 1.0, 1.0],
              [-7.0, 7.0, -8.0, 8.0, 0.0],
              [0.0, 1.0, 2.0, 3.0, 0.0],
          ],
          dtype=np.float32,
      )
  
      allowed_transitions = np.array(
          [
              [True, True, True, True, True],
              [True, True, True, True, True],
              [True, False, True, False, False],
              [True, True, True, True, True],
              [True, False, True, True, True],
          ]
      )
      # pyformat: enable
      # pylint: enable=bad-whitespace
      # pylint: enable=bad-continuation
      sequence, _ = viterbi_decode.decode(
          scores,
          transition_weights,
          allowed_transitions,
          use_log_space=use_log_space,
          use_start_and_end_states=use_start_and_end_states,
      )
  
      # Test a multi-item batch.
      multiple_input = np.array(
          [scores, scores, scores], dtype=np.float32
      )
  
      multiple_sequence_op = sequence_op.viterbi_constrained_sequence(
          multiple_input,
          [2, 2, 2],
          allowed_transitions=allowed_transitions,
          transition_weights=transition_weights,
          use_log_space=use_log_space,
          use_start_and_end_states=use_start_and_end_states,
      )
      multiple_sequence_result = self.evaluate(multiple_sequence_op)
      self.assertAllEqual(
          multiple_sequence_result, [sequence, sequence, sequence]
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
  from tensorflow_text.python.numpy import viterbi_decode
  from tensorflow_text.python.ops import viterbi_constrained_sequence_op
label_desc: Use image node_id 7 for calling the ViterbiConstrainedSequenceOpTest obj's underlying member method code with example usage: obj.test_sequence_in_log_space_with_start_end_states_multi_input() without return types