'Returns the BlockData associated with the given usage_key.
If not found, creates and returns a new BlockData and
maps it to the given key.'

def _get_or_create_block(self, usage_key):

    try:
        return self._block_data_map[usage_key]
    except KeyError:
        block_data = BlockData(usage_key)
        self._block_data_map[usage_key] = block_data
        return block_data
