def METHOD_NAME(self, preds, targets, num_layers, all_layers, idf, rescale_with_baseline, metric_key):
    """Test the bertscore functional."""
    metric_args = {
        "model_name_or_path": MODEL_NAME,
        "num_layers": num_layers,
        "all_layers": all_layers,
        "idf": idf,
        "rescale_with_baseline": rescale_with_baseline,
    }
    reference_bert_score_metric = partial(
        _reference_bert_score,
        num_layers=num_layers,
        all_layers=all_layers,
        idf=idf,
        rescale_with_baseline=rescale_with_baseline,
        metric_key=metric_key,
    )
    self.run_functional_metric_test(
        preds,
        targets,
        metric_functional=bert_score,
        reference_metric=reference_bert_score_metric,
        metric_args=metric_args,
        key=metric_key,
    )