code: def cm_accuracy(cm: np.ndarray):
      return np.trace(cm) / float(np.sum(cm))
  
file_path: chitra/chitra/visualization/metrics.py
imports: from itertools import product
  from typing import List, Union
  import matplotlib.pyplot
  import numpy
  from sklearn.metrics import confusion_matrix
  from chitra.logging import logger
label_desc: Use image node_id 2 for calling a global function with example usage: cm_accuracy(cm) and returns: unknown