def write_dot(G,path):
    """Write NetworkX graph G to Graphviz dot format on path.

    Parameters
    ----------
    G : graph
       A networkx graph
    path : filename
       Filename or file handle to write
    """
    try:
        import pygraphviz
    except __HOLE__:
        raise ImportError('requires pygraphviz ',
                          'http://networkx.lanl.gov/pygraphviz ',
                          '(not available for Python3)')
    A=to_agraph(G)
    A.write(path)
    A.clear()
    return
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/drawing/nx_agraph.py/write_dot