def to_representation(self, instance):
updated_course = copy.deepcopy(instance)<EOL>enterprise_customer_catalog = self.context['<STR_LIT>']<EOL>updated_course['<STR_LIT>'] = enterprise_customer_catalog.get_course_enrollment_url(<EOL>updated_course['<STR_LIT:key>']<EOL>)<EOL>for course_run in updated_course['<STR_LIT>']:<EOL><INDENT>course_run['<STR_LIT>'] = enterprise_customer_catalog.get_course_run_enrollment_url(<EOL>course_run['<STR_LIT:key>']<EOL>)<EOL><DEDENT>return updated_course<EOL>
Return the updated course data dictionary.

Arguments:
    instance (dict): The course data.

Returns:
    dict: The updated course data.