input: Write a function to select all Sundays of a given year.
  assert select_all_sundays(2020) == [datetime.date(2020, 1, 5), datetime.date(2020, 1, 12), datetime.date(2020, 1, 19), datetime.date(2020, 1, 26), datetime.date(2020, 2, 2), datetime.date(2020, 2, 9), datetime.date(2020, 2, 16), datetime.date(2020, 2, 23), datetime.date(2020, 3, 1), datetime.date(2020, 3, 8), datetime.date(2020, 3, 15), datetime.date(2020, 3, 22), datetime.date(2020, 3, 29), datetime.date(2020, 4, 5), datetime.date(2020, 4, 12), datetime.date(2020, 4, 19), datetime.date(2020, 4, 26), datetime.date(2020, 5, 3), datetime.date(2020, 5, 10), datetime.date(2020, 5, 17), datetime.date(2020, 5, 24), datetime.date(2020, 5, 31), datetime.date(2020, 6, 7), datetime.date(2020, 6, 14), datetime.date(2020, 6, 21), datetime.date(2020, 6, 28), datetime.date(2020, 7, 5), datetime.date(2020, 7, 12), datetime.date(2020, 7, 19), datetime.date(2020, 7, 26), datetime.date(2020, 8, 2), datetime.date(2020, 8, 9), datetime.date(2020, 8, 16), datetime.date(2020, 8, 23), datetime.date(2020, 8, 30), datetime.date(2020, 9, 6), datetime.date(2020, 9, 13), datetime.date(2020, 9, 20), datetime.date(2020, 9, 27), datetime.date(2020, 10, 4), datetime.date(2020, 10, 11), datetime.date(2020, 10, 18), datetime.date(2020, 10, 25), datetime.date(2020, 11, 1), datetime.date(2020, 11, 8), datetime.date(2020, 11, 15), datetime.date(2020, 11, 22), datetime.date(2020, 11, 29), datetime.date(2020, 12, 6), datetime.date(2020, 12, 13), datetime.date(2020, 12, 20), datetime.date(2020, 12, 27)]
  assert select_all_sundays(2021) == [datetime.date(2021, 1, 3), datetime.date(2021, 1, 10), datetime.date(2021, 1, 17), datetime.date(2021, 1, 24), datetime.date(2021, 1, 31), datetime.date(2021, 2, 7), datetime.date(2021, 2, 14), datetime.date(2021, 2, 21), datetime.date(2021, 2, 28), datetime.date(2021, 3, 7), datetime.date(2021, 3, 14), datetime.date(2021, 3, 21), datetime.date(2021, 3, 28), datetime.date(2021, 4, 4), datetime.date(2021, 4, 11), datetime.date(2021, 4, 18), datetime.date(2021, 4, 25), datetime.date(2021, 5, 2), datetime.date(2021, 5, 9), datetime.date(2021, 5, 16), datetime.date(2021, 5, 23), datetime.date(2021, 5, 30), datetime.date(2021, 6, 6), datetime.date(2021, 6, 13), datetime.date(2021, 6, 20), datetime.date(2021, 6, 27), datetime.date(2021, 7, 4), datetime.date(2021, 7, 11), datetime.date(2021, 7, 18), datetime.date(2021, 7, 25), datetime.date(202
output: def select_all_sundays(year):
      import datetime
      import calendar
      
      # List to store all Sundays of the year
      sundays = []
      
      # Iterate over all months of the given year
      for month in range(1, 13):
          # Get the number of days in the month
          num_days = calendar.monthrange(year, month)[1]
          # Iterate over all days of the month
          for day in range(1, num_days + 1):
              # Check if the current day is a Sunday
              if datetime.date(year, month, day).weekday() == 6:
                  sundays.append(datetime.date(year, month, day))
      
      return sundays