<｜begin▁of▁sentence｜>### Instruction:
Using the NetworkX 'read_gml' function, how can you read a graph from a GML file and list its nodes and edges?
### Response:
import networkx as nx

# Assume 'path_to_gml_file.gml' is a path to the GML file you want to read
file_path = 'path_to_gml_file.gml'

# Read the graph from the GML file
G = nx.read_gml(file_path)

# Print the nodes and edges of the graph
print('Nodes:', list(G.nodes))
print('Edges:', list(G.edges))
<|EOT|>
