def METHOD_NAME(intersect_area, pred_area, label_area):
    """
    Calculate iou.
    Args:
        intersect_area (np.ndarray): The intersection area of prediction and ground truth on all classes.
        pred_area (np.ndarray): The prediction area on all classes.
        label_area (np.ndarray): The ground truth area on all classes.
    Returns:
        np.ndarray: iou on all classes.
        float: mean iou of all classes.
    """
    union = pred_area + label_area - intersect_area
    class_iou = []
    for i in range(len(intersect_area)):
        if union[i] == 0:
            iou = 0
        else:
            iou = intersect_area[i] / union[i]
        class_iou.append(iou)
    miou = np.mean(class_iou)
    return np.array(class_iou), miou