'Mutates this block structure by removing any unreachable blocks.'

def _prune_unreachable(self):

    pruned_block_relations = {}
    old_block_relations = self._block_relations
    for block_key in self.post_order_traversal():
        if (block_key in old_block_relations):
            self._add_block(pruned_block_relations, block_key)
            for child in old_block_relations[block_key].children:
                if (child in pruned_block_relations):
                    self._add_to_relations(pruned_block_relations, block_key, child)
    self._block_relations = pruned_block_relations
