<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edge set [('X', 'Y')], can you generate a node-link formatted JSON representation using NetworkX's `node_link_data` function?
### Response:
import networkx as nx
import json

# Create a simple graph
G = nx.Graph()
G.add_edge('X', 'Y')

# Get the node-link data of the graph
node_link = nx.node_link_data(G)

# Convert to a JSON string
json_data = json.dumps(node_link)
print(json_data)
<|EOT|>
