def overlaps(self, other: "ImageElement", buffer: float = 1.0) -> bool:
        """Check if this image overlaps or is adjacent to another image, considering a buffer."""
        if self.bbox.page != other.bbox.page:
            return False

        return not (
            self.bbox.x1 + buffer < other.bbox.x0 - buffer
            or self.bbox.x0 - buffer > other.bbox.x1 + buffer
            or self.bbox.y1 + buffer < other.bbox.y0 - buffer
            or self.bbox.y0 - buffer > other.bbox.y1 + buffer
        )
Check if this image overlaps or is adjacent to another image, considering a buffer.
src/openparse/schemas.py