code: def score_corpus_multiprocess(
      self,
      hypothesis: List[str],
      references: List[List[str]],
      score="score",
  ) -> float:
      tokenizer = get_optional_dict(
          self.extra_args, "tokenizer", "none"
      )
      args = get_default_args(
          tokenize=tokenizer, num_refs=len(references)
      )
      scorer = BLEU(args)
      if self.n_workers == 1:
          corpus_score = scorer.corpus_score(
              hypothesis, references, use_effective_order=False
          )
      else:
          batches = list(
              self._batch(
                  hypothesis, references, n_batches=self.n_workers
              )
          )
          ref_len, sys_len = 0, 0
          correct = [0 for _ in range(BLEU.NGRAM_ORDER)]
          total = [0 for _ in range(BLEU.NGRAM_ORDER)]
          with ProcessPoolExecutor(
              max_workers=self.n_workers
          ) as executor:
              futures = [
                  executor.submit(
                      scorer.corpus_score,
                      b[0],
                      b[1],
                      use_effective_order=False,
                  )
                  for b in batches
              ]
              progress = as_completed(futures)
              if self.verbose:
                  progress = tqdm(progress)
              for future in progress:
                  s = future.result()
                  ref_len += s.ref_len
                  sys_len += s.sys_len
                  for n in range(BLEU.NGRAM_ORDER):
                      correct[n] += s.counts[n]
                      total[n] += s.totals[n]
              corpus_score = scorer.compute_bleu(
                  correct, total, sys_len, ref_len, smooth_method="exp"
              )
      proj = {"score": lambda s: s.score, "bp": lambda s: s.bp}.get(
          score
      )
      return proj(corpus_score)
  
file_path: vizseq/vizseq/scorers/bleu.py
imports: from concurrent.futures import ProcessPoolExecutor, as_completed
  from typing import List, Optional, Dict
  import argparse
  from sacrebleu.metrics import BLEU
  from tqdm import tqdm
  from vizseq.scorers import register_scorer, VizSeqScorer, VizSeqScore
  from vizseq._utils.optional import get_optional_dict
label_desc: Use image node_id 1 for calling the BLEUScorer obj's underlying member method code with example usage: obj.score_corpus_multiprocess(hypothesis, references, score) and returns: proj