def _extract_presentation_metadata(presentation: Presentation) -> Metadata:
        """Extract metadata from a presentation instance.

        Args:
            presentation: A `Presentation` object representing the PowerPoint file.

        Returns:
            PresentationMetadata: Object containing presentation-specific metadata fields.
        """
        metadata: Metadata = {}

        for metadata_key, core_property_key in [
            ("authors", "author"),
            ("comments", "comments"),
            ("status", "content_status"),
            ("created_by", "created"),
            ("identifier", "identifier"),
            ("keywords", "keywords"),
            ("modified_by", "last_modified_by"),
            ("modified_at", "modified"),
            ("version", "revision"),  # if version and revision are given, version overwrites ~keep
            ("subject", "subject"),
            ("title", "title"),
            ("version", "version"),
        ]:
            if core_property := getattr(presentation.core_properties, core_property_key, None):
                metadata[metadata_key] = core_property  # type: ignore[literal-required]

        if presentation.core_properties.language:
            metadata["languages"] = [presentation.core_properties.language]

        if presentation.core_properties.category:
            metadata["categories"] = [presentation.core_properties.category]

        fonts = set()
        for slide in presentation.slides:
            for shape in slide.shapes:
                if not hasattr(shape, "text_frame"):
                    continue

                for paragraph in shape.text_frame.paragraphs:
                    for run in paragraph.runs:
                        if hasattr(run, "font") and run.font.name:
                            fonts.add(run.font.name)

        if fonts:
            metadata["fonts"] = list(fonts)

        return metadata
Extract metadata from a presentation instance.

        Args:
            presentation: A `Presentation` object representing the PowerPoint file.

        Returns:
            PresentationMetadata: Object containing presentation-specific metadata fields.
        
kreuzberg/_extractors/_presentation.py