'Creates a vertical to associate with the group.
This appends the new vertical to the end of children, and updates group_id_to_child.
A mutable modulestore is needed to call this method (will need to update after mixed
modulestore work, currently relies on mongo\'s create_item method).'

def _create_vertical_for_group(self, group, user_id):

    assert (hasattr(self.system, 'modulestore') and hasattr(self.system.modulestore, 'create_item')), 'editor_saved    should    only    be    called    when    a    mutable    modulestore    is    available'
    modulestore = self.system.modulestore
    dest_usage_key = self.location.replace(category='vertical', name=uuid4().hex)
    metadata = {'display_name': DEFAULT_GROUP_NAME.format(group_id=group.id)}
    modulestore.create_item(user_id, self.location.course_key, dest_usage_key.block_type, block_id=dest_usage_key.block_id, definition_data=None, metadata=metadata, runtime=self.system)
    self.children.append(dest_usage_key)
    self.group_id_to_child[unicode(group.id)] = dest_usage_key
