'Creates and returns a MockModulestore from the given
children_map.
Arguments:
children_map ({block_key: [block_key]}) - A dictionary
mapping a block key to a list of block keys of the
block\'s corresponding children.'

@classmethod
def create(cls, children_map, block_key_factory):

    modulestore = MockModulestore()
    modulestore.set_blocks({block_key_factory(block_key): MockXBlock(block_key_factory(block_key), children=[block_key_factory(child) for child in children], modulestore=modulestore) for (block_key, children) in enumerate(children_map)})
    return modulestore
