code: def test_cm_accuracy():
      y_true, y_pred = get_y_true_y_pred()
      th_y_true, th_y_logits = compute_th_y_true_y_logits(
          y_true, y_pred
      )
  
      true_acc = accuracy_score(y_true.reshape(-1), y_pred.reshape(-1))
  
      cm = ConfusionMatrix(num_classes=3)
      acc_metric = cmAccuracy(cm)
  
      # Update metric
      output = (th_y_logits, th_y_true)
      cm.update(output)
  
      res = acc_metric.compute().numpy()
  
      assert pytest.approx(res) == true_acc
  
imports: import os
  import numpy
  import pytest
  import torch
  from sklearn.metrics import accuracy_score, confusion_matrix, precision_score, recall_score
  import ignite.distributed
  from ignite.exceptions import NotComputableError
  from ignite.metrics import ConfusionMatrix, IoU, JaccardIndex, mIoU
  from ignite.metrics.confusion_matrix import cmAccuracy, cmPrecision, cmRecall, DiceCoefficient
label_desc: Use image node_id 13 for calling a global function with example usage: test_cm_accuracy() without return types