def has_course_ended(end_date):
 return ((datetime.now(utc) > end_date) if (end_date is not None) else False)

def has_course_ended ( end_date ) : return ( ( datetime . now ( utc ) > end_date ) if ( end_date is not None ) else False )
given a courses end datetime .