'Creates and saves a new item in a course.
Returns the newly created item.
Args:
user_id: ID of the user creating and saving the xmodule
course_key: A :class:`~opaque_keys.edx.CourseKey` identifying which course to create
this item in
block_type: The typo of block to create
block_id: a unique identifier for the new item. If not supplied,
a new identifier will be generated'

def create_item(self, user_id, course_key, block_type, block_id=None, **kwargs):

    if (block_id is None):
        if (block_type == 'course'):
            block_id = course_key.run
        else:
            block_id = u'{}_{}'.format(block_type, uuid4().hex[:5])
    runtime = kwargs.pop('runtime', None)
    xblock = self.create_xblock(runtime, course_key, block_type, block_id, **kwargs)
    xblock = self.update_item(xblock, user_id, allow_not_found=True)
    return xblock
