code: def test_rouge_metric_wrong_key_value_error():
      """Test errors are raised on wrongly provided keys."""
      key = ("rouge1", "rouge")
  
      with pytest.raises(
          ValueError,
          match="Got unknown rouge key rouge. Expected to be one of",
      ):
          ROUGEScore(rouge_keys=key)
  
      with pytest.raises(
          ValueError,
          match="Got unknown rouge key rouge. Expected to be one of",
      ):
          rouge_score(
              _inputs_single_sentence_single_reference.preds,
              _inputs_single_sentence_single_reference.target,
              rouge_keys=key,
              accumulate="best",
          )
  
imports: import re
  from functools import partial
  from typing import Callable, Sequence, Union
  import pytest
  import torch
  from torch import Tensor
  from torchmetrics.functional.text.rouge import rouge_score
  from torchmetrics.text.rouge import ROUGEScore
  from torchmetrics.utilities.imports import _NLTK_AVAILABLE, _ROUGE_SCORE_AVAILABLE
  from typing_extensions import Literal
  from unittests.text.helpers import TextTester, skip_on_connection_issues
  from unittests.text.inputs import _Input, _inputs_multiple_references, _inputs_single_sentence_single_reference
label_desc: Use image node_id 3 for calling a global function with example usage: test_rouge_metric_wrong_key_value_error() without return types