code: def _rouge_score(
      preds: Union[str, Sequence[str]],
      target: Union[str, Sequence[str], Sequence[Sequence[str]]],
      accumulate: Literal["avg", "best"] = "best",
      use_stemmer: bool = False,
      normalizer: Optional[Callable[[str], str]] = None,
      tokenizer: Optional[Callable[[str], Sequence[str]]] = None,
      rouge_keys: Union[str, Tuple[str, ...]] = (
          "rouge1",
          "rouge2",
          "rougeL",
          "rougeLsum",
      ),
  ) -> Dict[str, Tensor]:
      """Wrapper for deprecated import.
  
      >>> preds = "My name is John"
      >>> target = "Is your name John"
      >>> from pprint import pprint
      >>> pprint(_rouge_score(preds, target))
      {'rouge1_fmeasure': tensor(0.7500),
          'rouge1_precision': tensor(0.7500),
          'rouge1_recall': tensor(0.7500),
          'rouge2_fmeasure': tensor(0.),
          'rouge2_precision': tensor(0.),
          'rouge2_recall': tensor(0.),
          'rougeL_fmeasure': tensor(0.5000),
          'rougeL_precision': tensor(0.5000),
          'rougeL_recall': tensor(0.5000),
          'rougeLsum_fmeasure': tensor(0.5000),
          'rougeLsum_precision': tensor(0.5000),
          'rougeLsum_recall': tensor(0.5000)}
  
      """
      _deprecated_root_import_func("rouge_score", "text")
      return rouge_score(
          preds=preds,
          target=target,
          accumulate=accumulate,
          use_stemmer=use_stemmer,
          normalizer=normalizer,
          tokenizer=tokenizer,
          rouge_keys=rouge_keys,
      )
  
imports: import os
  from typing import Any, Callable, Dict, List, Literal, Optional, Sequence, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn import Module
  from torchmetrics.functional.text.bert import bert_score
  from torchmetrics.functional.text.bleu import bleu_score
  from torchmetrics.functional.text.cer import char_error_rate
  from torchmetrics.functional.text.chrf import chrf_score
  from torchmetrics.functional.text.eed import extended_edit_distance
  from torchmetrics.functional.text.infolm import _ALLOWED_INFORMATION_MEASURE_LITERAL
  from torchmetrics.functional.text.infolm import infolm
  from torchmetrics.functional.text.mer import match_error_rate
  from torchmetrics.functional.text.perplexity import perplexity
  from torchmetrics.functional.text.rouge import rouge_score
  from torchmetrics.functional.text.sacre_bleu import sacre_bleu_score
  from torchmetrics.functional.text.squad import squad
  from torchmetrics.functional.text.ter import translation_edit_rate
  from torchmetrics.functional.text.wer import word_error_rate
  from torchmetrics.functional.text.wil import word_information_lost
  from torchmetrics.functional.text.wip import word_information_preserved
  from torchmetrics.utilities.imports import _TRANSFORMERS_GREATER_EQUAL_4_4
  from torchmetrics.utilities.prints import _deprecated_root_import_func
label_desc: Use image node_id 9 for calling a global function with example usage: _rouge_score(preds, target, accumulate, use_stemmer, normalizer, tokenizer, rouge_keys) and returns: rouge_score