def METHOD_NAME(self, option):
    checkbox_style_option = QStyleOptionButton()
    checkbox_rect = QApplication.style().subElementRect(
        QStyle.SubElement.SE_CheckBoxIndicator, checkbox_style_option, None
    )
    if self._centered:
        checkbox_anchor = QPoint(
            option.rect.x() + option.rect.width() / 2 - checkbox_rect.width() / 2,
            option.rect.y() + option.rect.height() / 2 - checkbox_rect.height() / 2,
        )
    else:
        checkbox_anchor = QPoint(
            option.rect.x() + checkbox_rect.width() / 2, option.rect.y() + checkbox_rect.height() / 2
        )
    return QRect(checkbox_anchor, checkbox_rect.size())