code: def _score_sentences_multiprocess(
      self,
      hypothesis: List[str],
      references: List[List[str]],
      sent_score_func: Optional[SENT_SCORE_FN_TYPE] = None,
  ) -> List[float]:
      self._update_n_workers(len(hypothesis))
      if self.n_workers == 1:
          sent_scores = sent_score_func(
              hypothesis, references, extra_args=self.extra_args
          )
      else:
          batches = list(
              self._batch(
                  hypothesis, references, n_batches=self.n_workers
              )
          )
          with ProcessPoolExecutor(
              max_workers=self.n_workers
          ) as executor:
              futures = {
                  executor.submit(
                      sent_score_func,
                      b[0],
                      b[1],
                      extra_args=self.extra_args,
                  ): i
                  for i, b in enumerate(batches)
              }
              progress = as_completed(futures)
              if self.verbose:
                  progress = tqdm(progress)
              tmp = {
                  futures[future]: future.result()
                  for future in progress
              }
          sent_scores = []
          for k in sorted(tmp):
              sent_scores.extend(tmp[k])
      return sent_scores
  
imports: from abc import abstractmethod
  import importlib
  import os
  import sys
  from pathlib import Path
  import math
  from typing import List, Optional, Set, Dict, Callable, NamedTuple, Tuple, Type
  from concurrent.futures import ProcessPoolExecutor, as_completed
  from multiprocessing import cpu_count
  import numpy
  from tqdm import tqdm
  from vizseq._utils.optional import map_optional
label_desc: Use image node_id 6 for calling the VizSeqScorer obj's underlying member method code with example usage: obj._score_sentences_multiprocess(hypothesis, references, sent_score_func) and returns: sent_scores