<｜begin▁of▁sentence｜>### Instruction:
Given a path graph with nodes 0 to 3, can you set an edge attribute 'weight' for each edge in the graph, where the weight is the product of the node ids of the connected nodes, and then print out the weight of the edge between nodes 1 and 2?
### Response:
import networkx as nx

# Create a graph
G = nx.path_graph(4)

# Compute some property, here just a dummy example where edge weight is the product of node ids
eweight = {(u, v): u*v for u, v in G.edges()}

# Set edge attributes
nx.set_edge_attributes(G, eweight, 'weight')

# Accessing the attribute of an edge
eprint(G.edges[1, 2]['weight'])
<|EOT|>
