<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with weighted edges [(0, 1, 3), (1, 2, 2), (2, 3, 1), (3, 4, 5)], how can you calculate the normalized mixing dictionary for 'in' and 'out' degrees using NetworkX?
### Response:
import networkx as nx

# Create a directed graph
DG = nx.DiGraph()
DG.add_weighted_edges_from([(0, 1, 3), (1, 2, 2), (2, 3, 1), (3, 4, 5)])

# Get the degree mixing dictionary for the 'in' and 'out' degrees
mixing_dict = nx.degree_mixing_dict(DG, x='out', y='in', normalized=True)

print(mixing_dict)
<|EOT|>
