code: def test_ter_return_sentence_level_score_functional():
      """Test that functional metric can return sentence level scores."""
      preds = _inputs_single_sentence_multiple_references.preds
      targets = _inputs_single_sentence_multiple_references.target
      _, sentence_ter = translation_edit_rate(
          preds, targets, return_sentence_level_score=True
      )
      isinstance(sentence_ter, Tensor)
  
imports: from functools import partial
  from typing import Sequence
  import pytest
  from torch import Tensor, tensor
  from torchmetrics.functional.text.ter import translation_edit_rate
  from torchmetrics.text.ter import TranslationEditRate
  from torchmetrics.utilities.imports import _SACREBLEU_AVAILABLE
  from unittests.text.helpers import TextTester
  from unittests.text.inputs import _inputs_multiple_references, _inputs_single_sentence_multiple_references
label_desc: Use image node_id 6 for calling a global function with example usage: test_ter_return_sentence_level_score_functional() without return types