def _cropped_image_from_annotations(self, annotations: Annotations) -> Tuple[(Annotations, Sequence[CroppedSignImage])]:
    fragment = self._fragments_repository.query_by_museum_number(annotations.fragment_number)
    fragment_image = self._photos_repository.query_by_file_name(f'{annotations.fragment_number}.jpg')
    image_bytes = fragment_image.read()
    image = Image.open(BytesIO(image_bytes), mode='r')
    return self._cropped_image_from_annotations_helper(annotations, image, fragment.script, fragment.text.labels)
def _cropped_image_from_annotations(self, annotations: Annotations) -> Tuple[(Annotations, Sequence[CroppedSignImage])]:
    fragment = self._fragments_repository.query_by_museum_number(annotations.fragment_number)
    fragment_image = self._photos_repository.query_by_file_name(f'{annotations.fragment_number}.jpg')
    image_bytes = fragment_image.read()
    image = Image.open(BytesIO(image_bytes), mode='r')
    return self._cropped_image_from_annotations_helper(annotations, image, fragment.script, fragment.text.labels)