code: def viterbi_decode(
      score: TensorLike, transition_params: TensorLike
  ) -> tf.Tensor:
      """Decode the highest scoring sequence of tags outside of TensorFlow.
  
      This should only be used at test time.
  
      Args:
        score: A [seq_len, num_tags] matrix of unary potentials.
        transition_params: A [num_tags, num_tags] matrix of binary potentials.
  
      Returns:
        viterbi: A [seq_len] list of integers containing the highest scoring tag
            indices.
        viterbi_score: A float containing the score for the Viterbi sequence.
      """
      trellis = np.zeros_like(score)
      backpointers = np.zeros_like(score, dtype=np.int32)
      trellis[0] = score[0]
  
      for t in range(1, score.shape[0]):
          v = np.expand_dims(trellis[t - 1], 1) + transition_params
          trellis[t] = score[t] + np.max(v, 0)
          backpointers[t] = np.argmax(v, 0)
  
      viterbi = [np.argmax(trellis[-1])]
      for bp in reversed(backpointers[1:]):
          viterbi.append(bp[viterbi[-1]])
      viterbi.reverse()
  
      viterbi_score = np.max(trellis[-1])
      return viterbi, viterbi_score
  
imports: import warnings
  import numpy
  import tensorflow
  from tensorflow_addons.rnn.abstract_rnn_cell import AbstractRNNCell
  from tensorflow_addons.utils.types import TensorLike
  from typeguard import typechecked
  from typing import Optional, Tuple
label_desc: Use image node_id 9 for calling a global function with example usage: viterbi_decode(score, transition_params) and returns: viterbi,  viterbi_score