code: def _reference_bert_score(
      preds: Sequence[str],
      target: Sequence[str],
      num_layers: int,
      all_layers: bool,
      idf: bool,
      rescale_with_baseline: bool,
      metric_key: Literal["f1", "precision", "recall"],
  ) -> Tensor:
      score_tuple = original_bert_score(
          preds,
          target,
          model_type=MODEL_NAME,
          lang="en",
          num_layers=num_layers,
          all_layers=all_layers,
          idf=idf,
          batch_size=len(preds),
          rescale_with_baseline=rescale_with_baseline,
          nthreads=0,
      )
      return score_tuple[_METRIC_KEY_TO_IDX[metric_key]]
  
file_path: torchmetrics/tests/unittests/text/test_bertscore.py
imports: import os
  from functools import partial
  from typing import Sequence
  import pytest
  from torch import Tensor
  from torchmetrics.functional.text.bert import bert_score
  from torchmetrics.text.bert import BERTScore
  from torchmetrics.utilities.imports import _BERTSCORE_AVAILABLE, _TRANSFORMERS_GREATER_EQUAL_4_4
  from typing_extensions import Literal
  from unittests.text.helpers import TextTester, skip_on_connection_issues
  from unittests.text.inputs import _inputs_single_reference
label_desc: Use image node_id 1 for calling a global function with example usage: _reference_bert_score(preds, target, num_layers, all_layers, idf, rescale_with_baseline, metric_key) and returns: score_tuple