def _cropped_image_from_annotations_helper(self, annotations: Annotations, image: Image.Image, script: str, labels: Sequence[LineLabel]) -> Tuple[(Annotations, Sequence[CroppedSignImage])]:
    cropped_sign_images = []
    updated_cropped_annotations = []
    for annotation in annotations.annotations:
        label = (self._label_by_line_number(annotation.data.path[0], labels) if (annotation.data.type != AnnotationValueType.BLANK) else '')
        cropped_image = annotation.crop_image(image)
        cropped_sign_image = CroppedSignImage.create(cropped_image)
        cropped_sign_images.append(cropped_sign_image)
        updated_cropped_annotation = attr.evolve(annotation, cropped_sign=CroppedSign(cropped_sign_image.image_id, script, label))
        updated_cropped_annotations.append(updated_cropped_annotation)
    return (attr.evolve(annotations, annotations=updated_cropped_annotations), cropped_sign_images)
def _cropped_image_from_annotations_helper(self, annotations: Annotations, image: Image.Image, script: str, labels: Sequence[LineLabel]) -> Tuple[(Annotations, Sequence[CroppedSignImage])]:
    cropped_sign_images = []
    updated_cropped_annotations = []
    for annotation in annotations.annotations:
        label = (self._label_by_line_number(annotation.data.path[0], labels) if (annotation.data.type != AnnotationValueType.BLANK) else )
        cropped_image = annotation.crop_image(image)
        cropped_sign_image = CroppedSignImage.create(cropped_image)
        cropped_sign_images.append(cropped_sign_image)
        updated_cropped_annotation = attr.evolve(annotation, cropped_sign=CroppedSign(cropped_sign_image.image_id, script, label))
        updated_cropped_annotations.append(updated_cropped_annotation)
    return (attr.evolve(annotations, annotations=updated_cropped_annotations), cropped_sign_images)