class_docstr: Tests for cpWER calculation.
class_docstr_tok: ["Tests","for","cpWER","calculation","."]
code: def test_cpwer_perfect(self):
      hyp = ["ff", "aa bb cc", "dd ee"]
      ref = ["aa bb cc", "dd ee", "ff"]
      cpWER, hyp_min, ref_str = calculate_session_cpWER(
          spk_hypothesis=hyp, spk_reference=ref
      )
      calculated = 0
      diff = torch.abs(torch.tensor(calculated - cpWER))
      assert diff <= 1e-6
      permuted_input_test(hyp, ref, calculated)
  
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 2 for calling the TestConcatMinPermWordErrorRate obj's underlying member method code with example usage: obj.test_cpwer_perfect() without return types