<｜begin▁of▁sentence｜>### Instruction:
As an assistant knowledgeable in networkx, I can help you with identifying cohesive blocks and their hierarchical structure within a given graph. Imagine you are analyzing a social network, where each cohesive group of closely connected individuals represents a cohesive block. Your task is to determine the hierarchy of these cohesive blocks, with each block's parent index identified. The graph representing this social network can be loaded from a file, such as network.gml, and then analyzed using networkx to identify the cohesive block hierarchy. If you have any specific requirements or data related to this social network graph, please feel free to provide further details.
### Response:
from igraph import Graph
from igraph.clustering import CohesiveBlocks

# Load the graph from a .gml file
g = Graph.Read_GML('network.gml')

# Calculate cohesive blocks
cb = CohesiveBlocks(g)
blocks = cb.calculate()

# Get the parents of each block
parents = blocks.parents()

# Print parent blocks
print(parents)
<|EOT|>
