def METHOD_NAME(save_path, image_groundtruth, image_predict):
    tail = save_path.split(".")[-1]
    save_path = (save_path[:-len(tail)] + "png")
    from matplotlib import use
    use('Agg')
    if image_groundtruth is not None:
        plt.subplot(1, 2, 1)
        plt.imshow(cv2.cvtColor(image_groundtruth, cv2.COLOR_BGR2RGB))
        plt.axis('off')
        plt.title("Ground Truth", y=-0.12)
        plt.subplot(1, 2, 2)
        plt.imshow(cv2.cvtColor(image_predict, cv2.COLOR_BGR2RGB))
        plt.axis('off')
        plt.title("Prediction", y=-0.12)
    else:
        plt.subplot(1, 1, 1)
        plt.imshow(cv2.cvtColor(image_predict, cv2.COLOR_BGR2RGB))
        plt.axis('off')
        plt.title("Prediction", y=-0.12)
    plt.tight_layout(pad=1.08)
    plt.autoscale()
    plt.savefig(save_path, dpi=600, bbox_inches='tight')
    plt.close()