def getMatrixSize(self):
        labelSize = self.getLabelSize()
        widgetSize = self.getWidgetSize()
        if self.labelLeft:
            return (max(labelSize[1], widgetSize[1]) + self.xlsMargin[1],
                    labelSize[0] + widgetSize[0] + self.xlsMargin[0])
        else:
            return (labelSize[1] + widgetSize[1] + self.xlsMargin[1],
                    max(labelSize[0], widgetSize[0]) + self.xlsMargin[0])

    # -------------------------------------------------------------------------
function to return the size of the widget
dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/S3QuestionTypeAbstractWidget.getMatrixSize