human
I wrote the below code

    draft_dir = (course_data_path + '/drafts')
    if (not os.path.exists(draft_dir)):
        return
    errorlog = make_error_tracker()
    data_dir = xml_module_store.data_dir
    if (not data_dir.endswith('/')):
        data_dir += '/'
    draft_course_dir = draft_dir.replace(data_dir, '', 1)
    system = ImportSystem(xmlstore=xml_module_store, course_id=source_course_id, course_dir=draft_course_dir, error_tracker=errorlog.tracker, load_error_modules=False, mixins=xml_module_store.xblock_mixins, field_data=KvsFieldData(kvs=DictKeyValueStore()), target_course_id=target_id)
    def _import_module(module):
        module_location = module.location.map_into_course(target_id)
        _update_module_location(module, module_location.replace(revision=MongoRevisionKey.draft))
        parent_url = get_parent_url(module)
        index = index_in_children_list(module)
        if ((parent_url is not None) and (index is not None)):
            course_key = descriptor.location.course_key
            parent_location = course_key.make_usage_key_from_deprecated_string(parent_url)
            parent_location = parent_location.map_into_course(target_id)
            parent = store.get_item(parent_location, depth=0)
            non_draft_location = module.location.map_into_course(target_id)
            if (not any(((child.block_id == module.location.block_id) for child in parent.children))):
                parent.children.insert(index, non_draft_location)
                store.update_item(parent, user_id)
        _update_and_import_module(module, store, user_id, source_course_id, target_id, runtime=mongo_runtime)
        for child in module.get_children():
            _import_module(child)
    drafts = []
    for (rootdir, __, filenames) in os.walk(draft_dir):
        for filename in filenames:
            if filename.startswith('._'):
                continue
            module_path = os.path.join(rootdir, filename)
            with open(module_path, 'r') as f:
                try:
                    xml =...

What's a good function header?
assistant
#Here's a good function header.

def _import_course_draft(xml_module_store, store, user_id, course_data_path, source_course_id, target_id, mongo_runtime):