<｜begin▁of▁sentence｜>### Instruction:
Given a file in the DIMACS minimum-cost flow file format, how can you use igraph's Read_DIMACS function to read the graph and extract edge capacities as well as source and target information?
### Response:
import igraph as ig

# Read a graph from a DIMACS formatted file
filename = 'path/to/your/dimacs/file.dim'
g = ig.Graph.Read_DIMACS(filename, directed=True)

# Get the source and target node from the graph attributes
source = g['source']
target = g['target']

# Get the edge capacities
edge_capacities = g.es['capacity']

# Print some information about the graph
count_edges = g.ecount()
print(f'The graph has {count_edges} edges with capacities: {edge_capacities}')
print(f'Source vertex: {source}, Target vertex: {target}')
<|EOT|>
