<｜begin▁of▁sentence｜>### Instruction:
{'Description': "Given a graph file 'graph.leda' in LEDA format, how do we read it into NetworkX and display its nodes and edges?", 'Parameters': "The file 'graph.leda' is a graph file in LEDA format, which may be a plain text file or compressed with .gz or .bz2.", 'Problem': 'We want to read a graph from a LEDA format file and be able to work with it within NetworkX.'}
### Response:
import networkx as nx

# Assuming 'graph.leda' is a file in LEDA format located in the current directory
g = nx.read_leda('graph.leda')

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