<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_weekly_date_range(self, metric_date, delta):
 """ Gets the range of years that we need to use as keys to get metrics from redis. """

        dates = [metric_date]
        end_date = metric_date + delta
        #Figure out how many years our metric range spans
        spanning_years = end_date.year - metric_date.year
        for i in range(spanning_years):
            #for the weekly keys, we only care about the year
            dates.append(
                datetime.date(
                    year=metric_date.year + (i + 1), month=1, day=1))
        return dates