<｜begin▁of▁sentence｜>### Instruction:
Given a weighted undirected path graph with 4 nodes and weights 5 on the edge between nodes 0 and 1, and weight 3 on the edge between nodes 2 and 3, can you compute the average neighbor degree for each node using NetworkX, considering the weights?
### Response:
import networkx as nx

# Create a weighted undirected graph
G = nx.path_graph(4)
# Add weights to the edges
G.edges[0, 1]['weight'] = 5
G.edges[2, 3]['weight'] = 3
# Compute the average neighbor degree
avg_neighbor_degree = nx.average_neighbor_degree(G, weight='weight')
print(avg_neighbor_degree)
<|EOT|>
