def generate_overall_html_from_tree(tree, output_filename, footer=""):
    """Generate an overall HTML file for all nodes in the tree."""
    html = open(output_filename, 'w')
    print({'name': ', '.join(sorted(tree.keys()))} % HEADER, file=html)
    def print_node(node, file_index):
        if file_index: # skip root node
            print_table_row(html, node, file_index)
    def sort_by(node_info):
        (key, node) = node_info
        return (-node.uncovered, key)
    traverse_tree_in_order(tree, [], print_node, sort_by)
    print('</table><hr/>', file=html)
    print(FOOTER % footer, file=html)
    html.close()
dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/test/coveragereport.py/generate_overall_html_from_tree/swapped operands of `%`