class_docstr: Test class for character error rate.
class_docstr_tok: ["Test","class","for","character","error","rate","."]
docstr: Test modular version of cer.
docstr_tok: ["Test","modular","version","of","cer","."]
code: def test_cer_class(self, ddp, preds, targets):
      """Test modular version of cer."""
      self.run_class_metric_test(
          ddp=ddp,
          preds=preds,
          targets=targets,
          metric_class=CharErrorRate,
          reference_metric=_compare_fn,
      )
  
file_path: torchmetrics/tests/unittests/text/test_cer.py
imports: from typing import Callable, List, Union
  import pytest
  from torchmetrics.functional.text.cer import char_error_rate
  from torchmetrics.text.cer import CharErrorRate
  from torchmetrics.utilities.imports import _JIWER_AVAILABLE
  from unittests.text.helpers import TextTester
  from unittests.text.inputs import _inputs_error_rate_batch_size_1, _inputs_error_rate_batch_size_2
label_desc: Use image node_id 1 for calling the TestCharErrorRate obj's underlying member method code with example usage: obj.test_cer_class(ddp, preds, targets) without return types