code: def _compute_bleu_metric_nltk(
      preds, targets, weights, smoothing_function, **kwargs: Any
  ):
      preds_ = [pred.split() for pred in preds]
      targets_ = [
          [line.split() for line in target] for target in targets
      ]
      return corpus_bleu(
          list_of_references=targets_,
          hypotheses=preds_,
          weights=weights,
          smoothing_function=smoothing_function,
          **kwargs,
      )
  
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 a global function with example usage: _compute_bleu_metric_nltk(preds, targets, weights, smoothing_function) and returns: corpus_bleu