def get_closest_course_run(course_runs):
if len(course_runs) == <NUM_LIT:1>:<EOL><INDENT>return course_runs[<NUM_LIT:0>]<EOL><DEDENT>now = datetime.datetime.now(pytz.UTC)<EOL>never = now - datetime.timedelta(days=<NUM_LIT>)<EOL>return min(course_runs, key=lambda x: abs(get_course_run_start(x, never) - now))<EOL>
Return course run with start date closest to now.