<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with nodes s, u, v, t, and edges with capacities as follows: ('s', 'u') with capacity 10, ('s', 'v') with capacity 10, ('u', 'v') with capacity 2, ('u', 't') with capacity 4, and ('v', 't') with capacity 10, how do we find the maximum flow from the source 's' to the sink 't' using Dinitz' algorithm, and subsequently print out the flow value and each edge's flow and capacity?
### Response:
import networkx as nx
from networkx.algorithms.flow import dinitz

# Create a directed graph
G = nx.DiGraph()
# Add edges with their capacity
G.add_edge('s', 'u', capacity=10)
G.add_edge('s', 'v', capacity=10)
G.add_edge('u', 'v', capacity=2)
G.add_edge('u', 't', capacity=4)
G.add_edge('v', 't', capacity=10)

# Use Dinitz' algorithm to find the maximum flow from s to t
R = dinitz(G, 's', 't')
flow_value = R.graph['flow_value']
print('Flow Value:', flow_value)

# Output the flow and capacity in each edge
for u, v, data in R.edges(data=True):
    print(f'Edge ({u}, {v}) - Flow: {data['flow']}, Capacity: {data['capacity']}')
<|EOT|>
