code: def concat_perm_word_error_rate(
      spk_hypotheses: List[List[str]], spk_references: List[List[str]]
  ) -> Tuple[List[float], List[str], List[str]]:
      """
      Launcher function for `calculate_session_cpWER`. Calculate session-level cpWER and average cpWER.
      For detailed information about cpWER, see docstrings of `calculate_session_cpWER` function.
  
      As opposed to `cpWER`, `WER` is the regular WER value where the hypothesis transcript contains
      words in temporal order regardless of the speakers. `WER` value can be different from cpWER value,
      depending on the speaker diarization results.
  
      Args:
          spk_hypotheses (list):
              List containing the lists of speaker-separated hypothesis transcripts.
          spk_references (list):
              List containing the lists of speaker-separated reference transcripts.
  
      Returns:
          cpWER (float):
              List containing cpWER values for each session
          min_perm_hyp_trans (list):
              List containing transcripts that lead to the minimum WER in string format
          ref_trans (list):
              List containing concatenated reference transcripts
      """
      if len(spk_hypotheses) != len(spk_references):
          raise ValueError(
              "In concatenated-minimum permutation word error rate calculation, "
              "hypotheses and reference lists must have the same number of elements. But got arguments:"
              f"{len(spk_hypotheses)} and {len(spk_references)} correspondingly"
          )
      cpWER_values, hyps_spk, refs_spk = [], [], []
      for spk_hypothesis, spk_reference in zip(
          spk_hypotheses, spk_references
      ):
          (
              cpWER,
              min_hypothesis,
              concat_reference,
          ) = calculate_session_cpWER(spk_hypothesis, spk_reference)
          cpWER_values.append(cpWER)
          hyps_spk.append(min_hypothesis)
          refs_spk.append(concat_reference)
      return cpWER_values, hyps_spk, refs_spk
  
file_path: NeMo/nemo/collections/asr/metrics/der.py
imports: import itertools
  from itertools import permutations
  from typing import Dict, List, Optional, Tuple
  import numpy
  import torch
  from pyannote.core import Segment, Timeline
  from pyannote.metrics.diarization import DiarizationErrorRate
  from nemo.collections.asr.metrics.wer import word_error_rate
  from nemo.collections.asr.parts.utils.optimization_utils import linear_sum_assignment
  from nemo.utils import logging
label_desc: Use image node_id 8 for calling a global function with example usage: concat_perm_word_error_rate(spk_hypotheses, spk_references) and returns: cpWER_values,  hyps_spk,  refs_spk