def make_einstring(tn):
    """
    Convert a TN into an einsum-style string describing its contraction
    """
    # Build einsum terms and free symbols from the nodes of the TN
    ein_terms = []
    free_syms = []
    for node in tn.nodes(as_iter=True, copy_nodes=False, danglers=True):
        if node.dangler:
            free_syms.append(node.symbol)
        else:
            ein_terms.append("".join(node.edge_symbols))

    return ",".join(ein_terms) + "->" + "".join(free_syms)