human
I wrote the below code

    def to_id(name):
        'Convert    name    to    id.'
        return topic_name_to_id(course, name)
    set_course_discussion_settings(course.id, divided_discussions=[to_id(name) for name in divided_discussions], always_divide_inline_discussions=always_divide_inline_discussions, division_scheme=CourseDiscussionSettings.COHORT)
    course.discussion_topics = dict(((name, {'sort_key': 'A', 'id': to_id(name)}) for name in discussion_topics))
    try:
        modulestore().update_item(course, ModuleStoreEnum.UserID.test)
    except NotImplementedError:
        pass

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

def config_course_discussions(course, discussion_topics={}, divided_discussions=[], always_divide_inline_discussions=False):