def complete_coarse_image(coarse_image, predicted_img):
    """Complete a coarsely labeld cityscapes image with predictions."""
    mask_indices = coarse_image == 0  # complete everywhere where coarse_image is 0
    coarse_image[mask_indices] = predicted_img[mask_indices]
    return coarse_image