'Returns the collected Block Structure for the root_block_usage_key,
getting block data from the cache and modulestore, as needed.
Details: The cache is updated if needed (if outdated or empty),
the modulestore is accessed if needed (at cache miss), and the
transformers data is collected if needed.
Returns:
BlockStructureBlockData - A collected block structure,
starting at root_block_usage_key, with collected data
from each registered transformer.'

def get_collected(self):

    try:
        block_structure = BlockStructureFactory.create_from_store(self.root_block_usage_key, self.store)
        BlockStructureTransformers.verify_versions(block_structure)
    except (BlockStructureNotFound, TransformerDataIncompatible):
        if config.waffle().is_enabled(config.RAISE_ERROR_WHEN_NOT_FOUND):
            raise
        else:
            block_structure = self._update_collected()
    return block_structure
