'Factory method for creating and returning a block structure
for the given children_map.'

def create_block_structure(self, children_map, block_structure_cls=BlockStructureBlockData):

    block_structure = block_structure_cls(root_block_usage_key=self.block_key_factory(0))
    for (parent, children) in enumerate(children_map):
        for child in children:
            block_structure._add_relation(self.block_key_factory(parent), self.block_key_factory(child))
    return block_structure
