@newrelic.agent.function_trace()
def make_course_settings(course, user):
 obj = {'is_cohorted': is_course_cohorted(course.id), 'allow_anonymous': course.allow_anonymous, 'allow_anonymous_to_peers': course.allow_anonymous_to_peers, 'cohorts': [{'id': str(g.id), 'name': g.name} for g in get_course_cohorts(course)], 'category_map': utils.get_discussion_category_map(course, user)}
 return obj

@ newrelic . agent . function_trace ( ) def make_course_settings ( course , user ) : obj = { 'is_cohorted' : is_course_cohorted ( course . id ) , 'allow_anonymous' : course . allow_anonymous , 'allow_anonymous_to_peers' : course . allow_anonymous_to_peers , 'cohorts' : [ { 'id' : str ( g . id ) , 'name' : g . name } for g in get_course_cohorts ( course ) ] , 'category_map' : utils . get_discussion_category_map ( course , user ) } return obj
generate a json-serializable model for course settings .