<｜begin▁of▁sentence｜>### Instruction:
Given a basic graph consisting of two nodes labeled 'Node 1' and 'Node 2' and a single edge connecting them with a weight of 1.5, can you use the GephiConnection.GephiConnection.write method to send this graph's data to a running Gephi server instance for visualization? The data should be converted to JSON format before sending. Assume Gephi is running on localhost:8080.
### Response:
from gephistreamer import streamer

# Create a GephiStreamer instance, assuming Gephi is running on localhost:8080
stream = streamer.GephiStreamer(streamer.GephiWS(hostname='localhost', port=8080))

# Sample data to send
data = {'nodes': [{'id': '1', 'label': 'Node 1'}, {'id': '2', 'label': 'Node 2'}], 'edges': [{'source': '1', 'target': '2', 'weight': 1.5}]}

# Convert your data to JSON and send it
data_json = json.dumps(data)
stream.write(data_json)
<|EOT|>
