r"""Performs an agglomerative heuristic, which progressively merges blocks
together (while allowing individual node moves) to achieve a good partition
in ``B`` blocks.
r"""Performs an agglomerative heuristic, which progressively merges blocks together (while allowing individual node moves) to achieve a good partition in ``B`` blocks.