def get_course_track_selection_url(course_run, query_parameters):
try:<EOL><INDENT>course_root = reverse('<STR_LIT>', kwargs={'<STR_LIT>': course_run['<STR_LIT:key>']})<EOL><DEDENT>except KeyError:<EOL><INDENT>LOGGER.exception(<EOL>"<STR_LIT>", course_run,<EOL>)<EOL>raise<EOL><DEDENT>url = '<STR_LIT>'.format(<EOL>settings.LMS_ROOT_URL,<EOL>course_root<EOL>)<EOL>course_run_url = update_query_parameters(url, query_parameters)<EOL>return course_run_url<EOL>
Return track selection url for the given course.

Arguments:
    course_run (dict): A dictionary containing course run metadata.
    query_parameters (dict): A dictionary containing query parameters to be added to course selection url.

Raises:
    (KeyError): Raised when course run dict does not have 'key' key.

Returns:
    (str): Course track selection url.