def persist_as_png(structure_dict, filepath):
    """Saves pipeline diagram to disk as png file.

    Args:
        structure_dict (dict): dict returned by
            :func:`~steppy.base.Step.upstream_structure`
        filepath (str): filepath to which the png with pipeline visualization should be persisted
    """
    graph = _create_graph(structure_dict)
    graph.write(filepath, format='png')
Saves pipeline diagram to disk as png file.

    Args:
        structure_dict (dict): dict returned by
            :func:`~steppy.base.Step.upstream_structure`
        filepath (str): filepath to which the png with pipeline visualization should be persisted