code: def test_char_error_rate():
      metric = metric_modules.CharErrorRateMetric()
      with metric.sync_context():
          metric.update(
              ["this is the prediction", "there is an other sample"],
              ["this is the reference", "there is another one"],
          )
          assert torch.isclose(
              torch.tensor(0.3415), metric.compute(), rtol=0.5
          )
  
imports: import pytest
  import torch
  from ludwig.distributed import init_dist_strategy
  from ludwig.modules import metric_modules
  from ludwig.schema.features.loss.loss import BWCEWLossConfig, SigmoidCrossEntropyLossConfig, SoftmaxCrossEntropyLossConfig
label_desc: Use image node_id 19 for calling a global function with example usage: test_char_error_rate() without return types