code: def calculate_sequence_score(
      inputs, transition_params, tag_indices, sequence_lengths
  ):
      expected_unary_score = sum(
          inputs[i][tag_indices[i]] for i in range(sequence_lengths)
      )
      expected_binary_score = sum(
          transition_params[tag_indices[i], tag_indices[i + 1]]
          for i in range(sequence_lengths - 1)
      )
      return expected_unary_score + expected_binary_score
  
file_path: rasa/tests/utils/tensorflow/test_crf.py
imports: import itertools
  import pytest
  import numpy
  import tensorflow
  from rasa.utils.tensorflow.crf import crf_sequence_score, crf_unary_score, crf_binary_score, crf_log_norm, crf_log_likelihood
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_sequence_score(inputs, transition_params, tag_indices, sequence_lengths) and returns: unknown