def centroid(self):
        """Returns the envelope centroid as a (x, y) tuple."""
        return self.min_x + self.width * 0.5, self.min_y + self.height * 0.5
Returns the envelope centroid as a (x, y) tuple.