<｜begin▁of▁sentence｜>### Instruction:
If you have a Gephi instance running on your local machine, which is listening for graph stream events on port 8080, and you want to add a node labeled 'Sample node' to the graph dynamically using the GephiGraphStreamer Python module, how do you format and send a JSON event to the Gephi streamer?
### Response:
from gephistreamer import GephiGraphStreamer

# Initialize streamer with the correct hostname and port
destination = GephiGraphStreamer.GephiConnection(hostname='localhost', port=8080)
streamer = GephiGraphStreamer.GephiGraphStreamer(encoder=None)

# Create a sample JSON event to add a node
event_json = {'an': {'node_id': {'label': 'Sample node'}}}

# Send the JSON event to Gephi
destination = streamer.send_event(event_json, destination=destination, flush=True)
<|EOT|>
