<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def weeks_of_year(cls, year):
 """Return an iterator over the weeks of the given year. Years have either 52 or 53 weeks."""

        w = cls(year, 1)
        while w.year == year:
            yield w
            w += 1