code: def accuracy(intersect_area, pred_area):
      """
      Calculate accuracy
  
      Args:
          intersect_area (Tensor): The intersection area of prediction and ground truth on all classes..
          pred_area (Tensor): The prediction area on all classes.
  
      Returns:
          np.ndarray: accuracy on all classes.
          float: mean accuracy.
      """
      intersect_area = intersect_area.numpy()
      pred_area = pred_area.numpy()
      class_acc = []
      for i in range(len(intersect_area)):
          if pred_area[i] == 0:
              acc = 0
          else:
              acc = intersect_area[i] / pred_area[i]
          class_acc.append(float(acc))
      macc = np.sum(intersect_area) / np.sum(pred_area)
      return np.array(class_acc), macc
  
file_path: PaddleSeg/paddleseg/utils/metrics.py
imports: import numpy
  import paddle
  import paddle.nn.functional
  import sklearn.metrics
label_desc: Use image node_id 5 for calling a global function with example usage: accuracy(intersect_area, pred_area) and returns: np,  macc