<｜begin▁of▁sentence｜>### Instruction:
Given a graph with an edge set and cohesive blocks calculated, how can you extract and visualize a subgraph corresponding to one of the cohesive blocks?
### Response:
import igraph as ig

# Assume 'g' is an igraph.Graph object with edges defined
# Load the graph with some edge set
g = ig.Graph(edges=[(0, 1), (1, 2), (0, 2), (3, 4)])

# Initialize CohesiveBlocks object
blocks = g.cohesive_blocks()

# Get the cohesive blocks
cohesive_blocks = blocks.cohesive_blocks()

# Choose one block to extract its subgraph. Let's say the first block
subgraph = cohesive_blocks.subgraph(0)

# Now 'subgraph' is an igraph.Graph object representing the subgraph
# corresponding to the first block.

# You can analyze or visualize this subgraph as needed
ig.plot(subgraph, layout=subgraph.layout('auto'))
<|EOT|>
