'Get block from module_data adding it to module_data if it\'s not already there but is in the structure
Raises:
ItemNotFoundError if block is not in the structure'

@contract(block_key=BlockKey, course_key='CourseLocator    |    LibraryLocator')
def get_module_data(self, block_key, course_key):

    json_data = self.module_data.get(block_key)
    if (json_data is None):
        self.modulestore.cache_items(self, [block_key], course_key, lazy=self.lazy)
        json_data = self.module_data.get(block_key)
        if (json_data is None):
            raise ItemNotFoundError(block_key)
    return json_data
