def METHOD_NAME(self, identifier, cm, metric_result,
                            prediction_mask_polygon, annotation_mask_polygon, per_class_result, ignore_label):
    report = {'identifier': identifier}
    class_result = {}
    if self.prediction is not None:
        prediction_mask_polygon = self.prediction.to_polygon()
    for label, polygons in prediction_mask_polygon.items():
        if label == ignore_label:
            continue
        class_result[int(label)] = {'prediction_mask': [polygon.tolist() for polygon in polygons]}
    if self.annotation:
        annotation_mask_polygon = self.annotation.to_polygon()
    for label, polygons in annotation_mask_polygon.items():
        if label == ignore_label:
            continue
        if int(label) not in class_result:
            class_result[int(label)] = {'prediction_mask': []}
        class_result[int(label)].update({'annotation_mask': [polygon.tolist() for polygon in polygons]})
    report['confusion_matrix'] = cm.tolist()
    report['result'] = np.mean(metric_result)
    if per_class_result:
        for label, metric in per_class_result.items():
            if int(label) not in class_result:
                continue
            class_result[int(label)]['result'] = metric
    report['per_class_result'] = class_result
    return report