def to_html(graph: BELGraph) -> str:
context = get_network_summary_dict(graph)<EOL>summary_dict = graph.summary_dict()<EOL>citation_years = context['<STR_LIT>']<EOL>function_count = context['<STR_LIT>']<EOL>relation_count = context['<STR_LIT>']<EOL>error_count = context['<STR_LIT>']<EOL>transformations_count = context['<STR_LIT>']<EOL>hub_data = context['<STR_LIT>']<EOL>disease_data = context['<STR_LIT>']<EOL>authors_count = context['<STR_LIT>']<EOL>variants_count = context['<STR_LIT>']<EOL>namespaces_count = context['<STR_LIT>']<EOL>confidence_count = context['<STR_LIT>']<EOL>confidence_data = [<EOL>(label, confidence_count.get(label, <NUM_LIT:0>))<EOL>for label in ('<STR_LIT:None>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL>]<EOL>template = environment.get_template('<STR_LIT>')<EOL>return template.render(<EOL>graph=graph,<EOL>chart_1_data=prepare_c3(function_count, '<STR_LIT>'),<EOL>chart_6_data=prepare_c3(namespaces_count, '<STR_LIT>'),<EOL>chart_5_data=prepare_c3(variants_count, '<STR_LIT>'),<EOL>number_variants=sum(variants_count.values()),<EOL>number_namespaces=len(namespaces_count),<EOL>chart_2_data=prepare_c3(relation_count, '<STR_LIT>'),<EOL>chart_4_data=prepare_c3(transformations_count, '<STR_LIT>') if transformations_count else None,<EOL>number_transformations=sum(transformations_count.values()),<EOL>chart_3_data=prepare_c3(error_count, '<STR_LIT>') if error_count else None,<EOL>chart_7_data=prepare_c3(hub_data, '<STR_LIT>'),<EOL>chart_9_data=prepare_c3(disease_data, '<STR_LIT>') if disease_data else None,<EOL>chart_authors_count=prepare_c3(authors_count, '<STR_LIT>'),<EOL>chart_10_data=prepare_c3_time_series(citation_years, '<STR_LIT>') if citation_years else None,<EOL>chart_confidence_count=prepare_c3(confidence_data, '<STR_LIT>'),<EOL>summary_dict=summary_dict,<EOL>**context<EOL>)<EOL>
Render the graph as an HTML string.

    Common usage may involve writing to a file like:

    >>> from pybel.examples import sialic_acid_graph
    >>> with open('html_output.html', 'w') as file:
    ...     print(to_html(sialic_acid_graph), file=file)