def METHOD_NAME(topofile) -> str:
    with open(topofile, 'r') as f:
        topo_config = yaml.safe_load(f)
    links = topo_links(topo_config)
    clusters = topo_clusters(topo_config)
    def format_nodes(indent, ases):
        fmt = '\t' * indent + '"%s"'
        return '\n'.join(fmt % isd_as for isd_as in ases)
    def format_links(indent, links):
        fmt = '\t' * indent + '"%s" -> "%s"%s'
        return '\n'.join(fmt % (link.a, link.b, fmt_attrs(link_attrs(link)))
                         for link in links)
    formatted_clusters = []
    for isd in sorted(clusters.keys()):
        core = core_fmt.format(
            isd=isd,
            core=format_nodes(3, clusters[isd]["core"]),
        )
        rest = format_nodes(2, clusters[isd]["noncore"])
        formatted_clusters.append(isd_fmt.format(isd=isd, core=core,
                                                 rest=rest))
    rest = format_links(1, links)
    return graph_fmt.format('\n'.join(c for c in formatted_clusters + [rest]))