code: def get_last_weeks(number_of_weeks):
      
      time_now = datetime.now()
      year = time_now.isocalendar()[0]
      week = time_now.isocalendar()[1]
      weeks = []
      for i in range(0, number_of_weeks):
          start = get_week_dates(year, week - i, as_timestamp=True)[0]
          n_year, n_week = get_year_week(start)
          weeks.append((n_year, n_week))
  
      return weeks
docs: Get the last weeks.