code: def test_sequence_in_exp_space_with_start_end_states_single_batch_item(
      self,
  ):
      use_log_space = False
      use_start_and_end_states = True
      scores = np.array(
          [[10.0, 12.0, 6.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(
          [
              [0.1, 0.2, 0.3, 0.4, 0.1],
              [0.5, 0.6, 0.7, 0.8, 0.1],
              [0.9, 1, 0.15, 1, 0.1],
              [0.25, 0.35, 0.45, 0.55, 0.5],
              [0.1, 0.5, 0.1, 0.1, 1],
          ],
          dtype=np.float32,
      )
  
      allowed_transitions = np.array(
          [
              [True, True, True, True, True],
              [True, True, True, True, True],
              [True, False, True, False, True],
              [True, True, True, True, True],
              [True, True, True, True, False],
          ]
      )
      # pyformat: enable
      # pylint: enable=bad-whitespace
      # pylint: enable=bad-continuation
      sequence = self._decode_greedy_sequence(
          scores,
          transition_weights,
          allowed_transitions,
          use_log_space=use_log_space,
          use_start_and_end_states=use_start_and_end_states,
      )
  
      # Test a single-item batch.
      single_input = np.array([scores], dtype=np.float32)
      single_sequence_op = greedy_op.greedy_constrained_sequence(
          single_input,
          [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,
      )
      single_result = self.evaluate(single_sequence_op)
      self.assertAllEqual(single_result, [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.ops import greedy_constrained_sequence_op
label_desc: Use image node_id 3 for calling the GreedyConstrainedSequenceOpTest obj's underlying member method code with example usage: obj.test_sequence_in_exp_space_with_start_end_states_single_batch_item() without return types