code: def _sacrebleu_ter_fn(
      preds: Sequence[str],
      target: Sequence[Sequence[str]],
      normalized: bool,
      no_punct: bool,
      asian_support: bool,
      case_sensitive: bool,
  ) -> Tensor:
      sacrebleu_ter = SacreTER(
          normalized=normalized,
          no_punct=no_punct,
          asian_support=asian_support,
          case_sensitive=case_sensitive,
      )
      # Sacrebleu CHRF expects different format of input
      target = [
          [tgt[i] for tgt in target] for i in range(len(target[0]))
      ]
      sacrebleu_ter = (
          sacrebleu_ter.corpus_score(preds, target).score / 100
      )
      return tensor(sacrebleu_ter)
  
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 1 for calling a global function with example usage: _sacrebleu_ter_fn(preds, target, normalized, no_punct, asian_support, case_sensitive) and returns: tensor