nx.set_node_attributes(G, 'graphics', {(0): {'x': -85.0, 'y': -97.0, 'w': 
    20.0, 'h': 20.0, 'type': '"ellipse"', 'fill': '"#889999"', 'outline':
    '"#666666"', 'outline_width': 1.0}, (1): {'x': -16.0, 'y': -1.0, 'w': 
    40.0, 'h': 40.0, 'type': '"ellipse"', 'fill': '"#ff9999"', 'outline':
    '"#666666"', 'outline_width': 1.0}})
nx.set_node_attributes(G, 'label', {(0): '0', (1): '1'})
nx.write_gml(G, 'network.gml')
Transfer layout from networkx to cytoscape