class_docstr: Test class for `BLEUScore` metric.
class_docstr_tok: ["Test","class","for","`","BLEUScore","`","metric","."]
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_bleu_score_class(
      self, ddp, preds, targets, weights, n_gram, smooth_func, smooth
  ):
      """Test class implementation of metric."""
      metric_args = {"n_gram": n_gram, "smooth": smooth}
      compute_bleu_metric_nltk = partial(
          _compute_bleu_metric_nltk,
          weights=weights,
          smoothing_function=smooth_func,
      )
  
      self.run_class_metric_test(
          ddp=ddp,
          preds=preds,
          targets=targets,
          metric_class=BLEUScore,
          reference_metric=compute_bleu_metric_nltk,
          metric_args=metric_args,
      )
  
imports: from functools import partial
  from typing import Any
  import pytest
  from nltk.translate.bleu_score import SmoothingFunction, corpus_bleu
  from torch import tensor
  from torchmetrics.functional.text.bleu import bleu_score
  from torchmetrics.text.bleu import BLEUScore
  from unittests.text.helpers import TextTester
  from unittests.text.inputs import _inputs_multiple_references
label_desc: Use image node_id 1 for calling the TestBLEUScore obj's underlying member method code with example usage: obj.test_bleu_score_class(ddp, preds, targets, weights, n_gram, smooth_func, smooth) without return types