<｜begin▁of▁sentence｜>### Instruction:
Given a network flow problem described in a file named 'network_flow.dimacs' adhering to the DIMACS minimum-cost flow format, can you read the network into an igraph object and extract the source and target nodes as well as the capacities of each edge?
### Response:
from igraph import Graph

# Read a graph from a DIMACS format file
g = Graph.Read_DIMACS('network_flow.dimacs', directed=True)

# Access the source, target, and capacity attributes
source = g['source']
target = g['target']
capacities = g.es['capacity']

# Print the information
print(f'Source node: {source}')
print(f'Target node: {target}')
print('Edge capacities:', capacities)
<|EOT|>
