def report(args, combined, stats):
    percent = safe_divide(stats['totalHits'], stats['totalSloc']) * 100
    print('Overall total: %s / %s (%.2f%%)' % (
        stats['totalHits'], stats['totalSloc'], percent))

    coverageEl = ET.Element('coverage', {
        'branch-rate': '0',
        'line-rate': str(percent / 100),
        'version': '3.6',
        'timestamp': str(int(time.time()))
    })
    packagesEl = ET.SubElement(coverageEl, 'packages')
    packageEl = ET.SubElement(packagesEl, 'package', {
        'branch-rate': '0',
        'complexity': '0',
        'line-rate': str(percent / 100),
        'name': ''
    })
    classesEl = ET.SubElement(packageEl, 'classes')

    for file, data in six.viewitems(combined):
        lineRate = safe_divide(stats['files'][file]['hits'],
                               stats['files'][file]['sloc'])
        classEl = ET.SubElement(classesEl, 'class', {
            'branch-rate': '0',
            'complexity': '0',
            'line-rate': str(lineRate),
            'filename': file,
            'name': file
        })
        linesEl = ET.SubElement(classEl, 'lines')
        ET.SubElement(classEl, 'methods')
        for lineNum, hit in six.viewitems(data):
            ET.SubElement(linesEl, 'line', {
                'number': str(lineNum),
                'hits': str(hit)
            })

    tree = ET.ElementTree(coverageEl)
    tree.write('js_coverage.xml')
    if percent < args.threshold:
        print('FAIL: Coverage below threshold (%s%%)' % args.threshold)
        sys.exit(1)
setModelData(editor: QStringEdit,
dataset/ETHPy150Open girder/girder/tests/js_coverage_tool.py/report--crossover with--dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/modules/paramexplore.py/QListEditItemDelegate.setModelData