<｜begin▁of▁sentence｜>### Instruction:
Given a GraphML file path 'path_to_graph.graphml', which contains information about nodes and edges of a graph, how can you read it into a NetworkX graph object and display the edges with their associated data using NetworkX?
### Response:
import networkx as nx

# Read a GraphML file
path = 'path_to_graph.graphml'
G = nx.read_graphml(path, node_type=str, edge_key_type=int)

# Print the edges of the graph
print(G.edges(data=True))
<|EOT|>
