code: def test_chrf_return_sentence_level_class():
      """Test that chrf can return sentence level scores."""
      chrf = CHRFScore(return_sentence_level_score=True)
      preds = _inputs_single_sentence_multiple_references.preds
      targets = _inputs_single_sentence_multiple_references.target
      _, chrf_sentence_score = chrf(preds, targets)
      isinstance(chrf_sentence_score, Tensor)
  
file_path: torchmetrics/tests/unittests/text/test_chrf.py
imports: from functools import partial
  from typing import Sequence
  import pytest
  from torch import Tensor, tensor
  from torchmetrics.functional.text.chrf import chrf_score
  from torchmetrics.text.chrf import CHRFScore
  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 5 for calling a global function with example usage: test_chrf_return_sentence_level_class() without return types