def reading_order(self) -> ReadingOrder:
        """
        To sort nodes based on their reading order, we need to calculate an aggregate position for the node. This allows us to:

        nodes = sorted(nodes, key=lambda x: x.reading_order)

        Returns a tuple of (min_page, y_position, min_x0) to use as sort keys, where y_position is adjusted based on the coordinate system.
        """
        min_page = min(element.bbox.page for element in self.elements)
        min_x0 = min(element.bbox.x0 for element in self.elements)

        if self.coordinate_system == "bottom-left":
            y_position = -min(element.bbox.y0 for element in self.elements)
        else:
            raise NotImplementedError(
                "Only 'bottom-left' coordinate system is supported."
            )

        return ReadingOrder(min_page=min_page, y_position=y_position, min_x0=min_x0)

        To sort nodes based on their reading order, we need to calculate an aggregate position for the node. This allows us to:

        nodes = sorted(nodes, key=lambda x: x.reading_order)

        Returns a tuple of (min_page, y_position, min_x0) to use as sort keys, where y_position is adjusted based on the coordinate system.
        
src/openparse/schemas.py