'Returns the serialized data for the given BlockStructureModel
from the cache.
Raises:
BlockStructureNotFound if not found.'

def _get_from_cache(self, bs_model):

    cache_key = self._encode_root_cache_key(bs_model)
    serialized_data = self._cache.get(cache_key)
    if (not serialized_data):
        logger.info('BlockStructure:    Not    found    in    cache;    %s.', bs_model)
        raise BlockStructureNotFound(bs_model.data_usage_key)
    else:
        logger.info('BlockStructure:    Read    from    cache;    %s,    size:    %d', bs_model, len(serialized_data))
    return serialized_data
