def write_timings_sheet(self, summary, filename=None):
        import xlwt
        RED = 0x0A
        book = xlwt.Workbook(encoding="utf-8")
        sheet = book.add_sheet("Timings")
        stylebroken = xlwt.XFStyle()
        stylebroken.pattern.pattern = stylebroken.pattern.SOLID_PATTERN
        stylebroken.pattern.pattern_fore_colour = RED
        col = 1
        for date in summary["date"]:
            sheet.write(0,col,str(date))
            col += 1
        row = 1
        for (url, results) in summary.items():
            if url == "date":
                continue
            sheet.write(row,0,url)
            col = 1
            for data in results:
                if len(data) == 2 and data[1]:
                    sheet.write(row,col,data[0],stylebroken)
                elif len(data) > 0:
                    sheet.write(row,col,data[0])
                col += 1
            row += 1
        if filename:
            book.save(filename)
        return book
dataset/ETHPy150Open sahana/eden/modules/tests/smoke/broken_links.py/BrokenLinkTest.write_timings_sheet/original