<｜begin▁of▁sentence｜>### Instruction:
In a network visualization where you can modify the network graph in real-time using the Gephi graph streaming API, if you need to remove a node with the identifier 'node_42', how can you generate the appropriate delete node event object to send to the API?
### Response:
import json

def generate_delete_node_event(node_id):
    return json.dumps({'an': {node_id: {'action': 'delete'}}})

# Example usage
delete_node_event = generate_delete_node_event('node_42')
print(delete_node_event)
<|EOT|>
