def weeks_per_year(year):
<EOL>jan1 = jwday(gregorian.to_jd(year, <NUM_LIT:1>, <NUM_LIT:1>))<EOL>if jan1 == THU or (jan1 == WED and isleap(year)):<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>
Number of ISO weeks in a year