<｜begin▁of▁sentence｜>### Instruction:
Given a graph represented as a list of weighted edges [(0, 1, 1), (1, 2, 1), (2, 3, 1), (3, 4, 1), (0, 4, 10)], find the shortest path and its length from node 0 to node 4 using the bidirectional_dijkstra function from NetworkX.
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()

# Add weighted edges to the graph
G.add_weighted_edges_from([(0, 1, 1), (1, 2, 1), (2, 3, 1), (3, 4, 1), (0, 4, 10)])

# Use the bidirectional_dijkstra function to find the shortest path and its length
length, path = nx.bidirectional_dijkstra(G, 0, 4, weight='weight')

print('Shortest path length:', length)
print('Shortest path:', path)
<|EOT|>
