import networkx


def write_nxgraph_to_dot(g, output):
    """
    Write a networkx graph as DOT to the specified output

    Args:
        g (networkx.Graph): graph to write as DOT
        output (filelike): output to write to
    """

    return networkx.drawing.nx_pydot.write_dot(g, output)