@open_file(1, mode='wb')
def write_gpickle(G, path, protocol=pickle.HIGHEST_PROTOCOL):
 pickle.dump(G, path, protocol)

@ open_file ( 1 , mode = 'wb' ) def write_gpickle ( G , path , protocol = pickle . HIGHEST_PROTOCOL ) : pickle . dump ( G , path , protocol )
write graph in python pickle format .