@open_file(1, mode='wt')
def write_sparse6(G, path, nodes=None, header=True):
 path.write(generate_sparse6(G, nodes=nodes, header=header))
 path.write('\n')

@ open_file ( 1 , mode = 'wt' ) def write_sparse6 ( G , path , nodes = None , header = True ) : path . write ( generate_sparse6 ( G , nodes = nodes , header = header ) ) path . write ( '\n' )
write graph g to given path in sparse6 format .