'Create and return a new course. For performance reasons, we do not emit
signals during this process, but if you need signals to run, you can
pass `emit_signals=True` to this method.'

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

    org = kwargs.pop('org', None)
    number = kwargs.pop('course', kwargs.pop('number', None))
    store = kwargs.pop('modulestore')
    name = kwargs.get('name', kwargs.get('run', Location.clean(kwargs.get('display_name'))))
    run = kwargs.pop('run', name)
    user_id = kwargs.pop('user_id', ModuleStoreEnum.UserID.test)
    emit_signals = kwargs.pop('emit_signals', False)
    kwargs.update(kwargs.pop('metadata', {}))
    default_store_override = kwargs.pop('default_store', None)
    with store.branch_setting(ModuleStoreEnum.Branch.draft_preferred):
        course_key = store.make_course_key(org, number, run)
        with store.bulk_operations(course_key, emit_signals=emit_signals):
            if (default_store_override is not None):
                with store.default_store(default_store_override):
                    new_course = store.create_course(org, number, run, user_id, fields=kwargs)
            else:
                new_course = store.create_course(org, number, run, user_id, fields=kwargs)
            last_course.loc = new_course.location
            return new_course
