'Uses ``**kwargs``:
:parent_location: (required): the location of the parent module
(e.g. the parent course or section)
:category: the category of the resulting item.
:data: (optional): the data for the item
(e.g. XML problem definition for a problem item)
:display_name: (optional): the display name of the item
:metadata: (optional): dictionary of metadata attributes
:boilerplate: (optional) the boilerplate for overriding field values
:publish_item: (optional) whether or not to publish the item (default is True)
:target_class: is ignored'

@classmethod
def _create(cls, target_class, **kwargs):

    assert ('template' not in kwargs)
    parent_location = kwargs.pop('parent_location', None)
    data = kwargs.pop('data', None)
    category = kwargs.pop('category', None)
    display_name = kwargs.pop('display_name', None)
    metadata = kwargs.pop('metadata', {})
    location = kwargs.pop('location')
    user_id = kwargs.pop('user_id', ModuleStoreEnum.UserID.test)
    publish_item = kwargs.pop('publish_item', True)
    assert isinstance(location, UsageKey)
    assert (location != parent_location)
    store = kwargs.pop('modulestore')
    parent = (kwargs.pop('parent', None) or store.get_item(parent_location))
    with store.branch_setting(ModuleStoreEnum.Branch.draft_preferred):
        if ('boilerplate' in kwargs):
            template_id = kwargs.pop('boilerplate')
            clz = XBlock.load_class(category, select=prefer_xmodules)
            template = clz.get_template(template_id)
            assert (template is not None)
            metadata.update(template.get('metadata', {}))
            if (not isinstance(data, basestring)):
                data.update(template.get('data'))
        if (display_name is not None):
            metadata['display_name'] = display_name
        module = store.create_child(user_id, parent.location, location.block_type, block_id=location.block_id, metadata=metadata, definition_data=data, runtime=parent.runtime, fields=kwargs)
        if (category == 'static_tab'):
            dog_stats_api.increment(DEPRECATION_VSCOMPAT_EVENT, tags=('location:itemfactory_create_static_tab', u'block:{}'.format(location.block_type)))
            course = store.get_course(location.course_key)
            course.tabs.append(CourseTab.load('static_tab', name='Static    Tab', url_slug=location.name))
            store.update_item(course, user_id)
        if ('detached' not in module._class_tags):
            parent.children.append(location)
            store.update_item(parent, user_id)
            if publish_item:
                published_parent = store.publish(parent.location, user_id)
                return published_parent.get_children()[(-1)]
            else:
                return store.get_item(location)
        elif publish_item:
            return store.publish(location, user_id)
        else:
            return module
