class_docstr: Tests for cpWER calculation.
class_docstr_tok: ["Tests","for","cpWER","calculation","."]
code: def test_cpwer_overcount(self):
      hyp = ["aa bb cc", "dd ee gg hh", "ii jj kk"]
      ref = ["aa bb cc", "dd ee ff gg hh ii jj kk"]
      _ins, _del, _sub = 0, 1, 0
      cpWER, hyp_min, ref_str = calculate_session_cpWER(
          spk_hypothesis=hyp, spk_reference=ref
      )
      ref_word_count = word_count(ref)
      calculated = calculate_wer_count(_ins, _del, _sub, ref_word_count)
      diff = torch.abs(torch.tensor(calculated - cpWER))
      assert diff <= 1e-6
      (
          cpWER_perm,
          hyp_min_perm,
          ref_str,
      ) = calculate_session_cpWER_bruteforce(
          spk_hypothesis=hyp, spk_reference=ref
      )
      diff = torch.abs(torch.tensor(cpWER_perm - cpWER))
      assert diff <= 1e-6
  
file_path: NeMo/tests/collections/asr/test_diar_metrics.py
imports: from itertools import permutations
  import pytest
  import torch
  from nemo.collections.asr.metrics.der import calculate_session_cpWER, calculate_session_cpWER_bruteforce, get_online_DER_stats, get_partial_ref_labels
label_desc: Use image node_id 5 for calling the TestConcatMinPermWordErrorRate obj's underlying member method code with example usage: obj.test_cpwer_overcount() without return types