def writeToMatrix(self,
                      matrix,
                      row,
                      col,
                      langDict={},
                      answerMatrix=None
                      ):
        self._store_metadata()
        startrow = row
        startcol = col
        mergeLH = 0
        mergeLV = 0
        height = 0
        width = 0
        if self.label:
            _TQstn = self._Tquestion(langDict)
            cell = survey_MatrixElement(row,
                                        col,
                                        _TQstn,
                                        style="styleSubHeader")
            (width, height) = self.getLabelSize()
            mergeLH = width - 1
            mergeLV = height - 1
            cell.merge(mergeLH, mergeLV)
            matrix.addElement(cell)
            if self.labelLeft:
                col += 1 + mergeLH
            else:
                row += 1 + mergeLV
        cell = survey_MatrixElement(row, col, "", style="styleInput")
        mergeWH = self.xlsWidgetSize[0]
        mergeWV = self.xlsWidgetSize[1]
        cell.merge(mergeWH, mergeWV)
        matrix.addElement(cell)
        if self.labelLeft:
            height = max(height, mergeWV + 1)
            width += mergeWH + 1
        else:
            height += mergeWV + 1
            width = max(width, mergeWH + 1)
        self.addPaddingAroundWidget(matrix, startrow, startcol, mergeLH+1, mergeLV+1, mergeWH+1, mergeWV+1)
        # Add widget padding
        self.addPaddingToCell(matrix, startrow, startcol, startrow + height, startcol + width)
        height += self.xlsMargin[1]
        width += self.xlsMargin[0]
        # Add details to the answerMatrix (if required)
        if answerMatrix != None:
            answerRow = answerMatrix.lastRow+1
            cell = survey_MatrixElement(answerRow, 0, self.question["code"],
                                        style="styleSubHeader")
            answerMatrix.addElement(cell)
            cell = survey_MatrixElement(answerRow, 3,
                                        self.rowcol_to_cell(row, col),
                                        style="styleText")
            answerMatrix.addElement(cell)
        endcol = startcol+width
        endrow = startrow+height
        if DEBUG:
            # Only for debugging purposes
            self.verifyCoords(endrow, endcol)
        return (endrow, endcol)
        #if self.labelLeft:
        #    return (row+self.xlsMargin[1]+height, col+self.xlsMargin[0]+mergeWH)
        #else:
        #    return (row+self.xlsMargin[1]+mergeLV+mergeWV, col+self.xlsMargin[0]+max(mergeLH,mergeWH))

    # -------------------------------------------------------------------------
Load IAB size fixture.
dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/S3QuestionTypeAbstractWidget.writeToMatrix--crossover with--dataset/ETHPy150Open mlavin/django-ad-code/adcode/tests/test_fixtures.py/FixturesTestCase.test_iab_sizes