'Create the new xblock but don\'t save it. Returns the new module.
:param runtime: if you already have an xblock from the course, the xblock.runtime value
:param fields: a dictionary of field names and values for the new xmodule'

def create_xblock(self, runtime, course_key, block_type, block_id=None, fields=None, metadata=None, definition_data=None, **kwargs):

    if (metadata is None):
        metadata = {}
    if (definition_data is None):
        definition_data = {}
    if (block_id is None):
        if (block_type == 'course'):
            block_id = course_key.run
        else:
            block_id = u'{}_{}'.format(block_type, uuid4().hex[:5])
    if (runtime is None):
        services = {}
        if self.i18n_service:
            services['i18n'] = self.i18n_service
        if self.fs_service:
            services['fs'] = self.fs_service
        if self.user_service:
            services['user'] = self.user_service
        services['partitions'] = PartitionService(course_key)
        runtime = CachingDescriptorSystem(modulestore=self, module_data={}, course_key=course_key, default_class=self.default_class, resources_fs=None, error_tracker=self.error_tracker, render_template=self.render_template, cached_metadata={}, mixins=self.xblock_mixins, select=self.xblock_select, services=services)
    xblock_class = runtime.load_block_type(block_type)
    location = course_key.make_usage_key(block_type, block_id)
    dbmodel = self._create_new_field_data(block_type, location, definition_data, metadata)
    xmodule = runtime.construct_xblock_from_class(xblock_class, ScopeIds(None, block_type, location, location), dbmodel, for_parent=kwargs.get('for_parent'))
    if (fields is not None):
        for (key, value) in fields.iteritems():
            setattr(xmodule, key, value)
    xmodule.save()
    return xmodule
