def emit_team_event(event_name, course_key, event_data):
 context = contexts.course_context_from_course_id(course_key)
 with tracker.get_tracker().context(event_name, context):
  tracker.emit(event_name, event_data)

def emit_team_event ( event_name , course_key , event_data ) : context = contexts . course_context_from_course_id ( course_key ) with tracker . get_tracker ( ) . context ( event_name , context ) : tracker . emit ( event_name , event_data )
emit team events with the correct course id context .