def convert_to_geoff(discoursegraph):
    """
    Parameters
    ----------
    discoursegraph : DiscourseDocumentGraph
        the discourse document graph to be converted into GEOFF format

    Returns
    -------
    geoff : string
        a geoff string representation of the discourse graph.
    """
    dg_copy = deepcopy(discoursegraph)
    layerset2list(dg_copy)
    add_node_ids_as_labels(dg_copy)
    return graph2geoff(dg_copy, 'LINKS_TO')
Parameters
    ----------
    discoursegraph : DiscourseDocumentGraph
        the discourse document graph to be converted into GEOFF format

    Returns
    -------
    geoff : string
        a geoff string representation of the discourse graph.