prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [Feature]: Add support for Christchurch (NZ) special date overrides
  ### I propose a feature for:
  
  Sources
  
  ### Describe your wanted feature
  
  The API for collection dates for Christchurch City Council does not automatically apply any special date overrides (for example, when your collection day falls near a public holiday and is moved).
  A separate URL provides a list of these potential overrides, it needs to be called separately and the results merged.
  
  The URL is [https://ccc.govt.nz/api/kerbsidedateoverrides](https://ccc.govt.nz/api/kerbsidedateoverrides)
  It responds to HTTP GET with no authentication requirements and will return an array of overrides dates in this format:
  ```
  {
      ID: 32,
      Title: "New Year Friday 2024",
      OriginalDate: "2024-01-05",
      NewDate: "2024-01-06",
      Expired: 0
  }
  ```
  If your collection date falls on `OriginalDate` it needs to be moved to `NewDate`.
  
  </issue>
  <code>
  [start of custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py]
  1 import datetime
  2 
  3 import requests
  4 from waste_collection_schedule import Collection
  5 
  6 # Include work around for SSL UNSAFE_LEGACY_RENEGOTIATION_DISABLED error
  7 from waste_collection_schedule.service.SSLError import get_legacy_session
  8 
  9 
  10 TITLE = "Christchurch City Council"
  11 DESCRIPTION = "Source for Christchurch City Council."
  12 URL = "https://ccc.govt.nz"
  13 TEST_CASES = {"53 Hereford Street": {"address": "53 Hereford Street"}}
  14 
  15 
  16 class Source:
  17     def __init__(self, address):
  18         self._address = address
  19 
  20     def fetch(self):
  21 
  22         s = get_legacy_session()
  23 
  24         entries = []
  25 
  26         # Find the Rating Unit ID by the physical address
  27         # While a property may have more than one address, bins are allocated by each Rating Unit
  28         addressQuery = {
  29             "q": self._address,
  30             "status": "current",
  31             "crs": "epsg:4326",
  32             "limit": 1,
  33         }
  34 
  35         r = s.get("https://opendata.ccc.govt.nz/CCCSearch/rest/address/suggest",
  36             params=addressQuery,
  37             # verify=False,
  38         )
  39         address = r.json()
  40 
  41         # Find the Bin service by Rating Unit ID
  42         binsHeaders = {
  43             "client_id": "69f433c880c74c349b0128e9fa1b6a93",
  44             "client_secret": "139F3D2A83E34AdF98c80566f2eb7212"
  45         }
  46 
  47         # Updated request using SSL code snippet
  48         r = s.get("https://ccc-data-citizen-api-v1-prod.au-s1.cloudhub.io/api/v1/properties/" + str(address[0]["RatingUnitID"]),
  49             headers=binsHeaders
  50             # verify=False,
  51         )
  52         bins = r.json()
  53         
  54         # Deduplicate the Bins in case the Rating Unit has more than one of the same Bin type
  55         bins = {each["material"]: each for each in bins["bins"]["collections"]}.values()
  56 
  57         # Process each Bin
  58         for bin in bins:
  59             entries.append(
  60                 Collection(
  61                     datetime.datetime.strptime(
  62                         bin["next_planned_date_app"], "%Y-%m-%d"
  63                     ).date(),
  64                     bin["material"],
  65                 )
  66             )
  67 
  68         return entries
  69
  [end of custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py
  --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py
  +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py
  @@ -54,6 +54,16 @@
           # Deduplicate the Bins in case the Rating Unit has more than one of the same Bin type
           bins = {each["material"]: each for each in bins["bins"]["collections"]}.values()
   
  +        # Get the list of Overrides for any special dates
  +        # It will be an array of these: { ID: 32, Title: "New Year Friday 2024", OriginalDate: "2024-01-05", NewDate: "2024-01-06", Expired: 0 }
  +        overrides = requests.get("https://ccc.govt.nz/api/kerbsidedateoverrides").json()
  +
  +        # Process each Override
  +        for bin in bins:
  +            for override in overrides:
  +                if override["OriginalDate"] == bin["next_planned_date_app"]:
  +                    bin["next_planned_date_app"] = override["NewDate"]
  +
           # Process each Bin
           for bin in bins:
               entries.append(
  
verification_info: {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py\n+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py\n@@ -54,6 +54,16 @@\n         # Deduplicate the Bins in case the Rating Unit has more than one of the same Bin type\n         bins = {each[\"material\"]: each for each in bins[\"bins\"][\"collections\"]}.values()\n \n+        # Get the list of Overrides for any special dates\n+        # It will be an array of these: { ID: 32, Title: \"New Year Friday 2024\", OriginalDate: \"2024-01-05\", NewDate: \"2024-01-06\", Expired: 0 }\n+        overrides = requests.get(\"https://ccc.govt.nz/api/kerbsidedateoverrides\").json()\n+\n+        # Process each Override\n+        for bin in bins:\n+            for override in overrides:\n+                if override[\"OriginalDate\"] == bin[\"next_planned_date_app\"]:\n+                    bin[\"next_planned_date_app\"] = override[\"NewDate\"]\n+\n         # Process each Bin\n         for bin in bins:\n             entries.append(\n", "issue": "[Feature]: Add support for Christchurch (NZ) special date overrides\n### I propose a feature for:\n\nSources\n\n### Describe your wanted feature\n\nThe API for collection dates for Christchurch City Council does not automatically apply any special date overrides (for example, when your collection day falls near a public holiday and is moved).\r\nA separate URL provides a list of these potential overrides, it needs to be called separately and the results merged.\r\n\r\nThe URL is [https://ccc.govt.nz/api/kerbsidedateoverrides](https://ccc.govt.nz/api/kerbsidedateoverrides)\r\nIt responds to HTTP GET with no authentication requirements and will return an array of overrides dates in this format:\r\n```\r\n{\r\n    ID: 32,\r\n    Title: \"New Year Friday 2024\",\r\n    OriginalDate: \"2024-01-05\",\r\n    NewDate: \"2024-01-06\",\r\n    Expired: 0\r\n}\r\n```\r\nIf your collection date falls on `OriginalDate` it needs to be moved to `NewDate`.\n", "before_files": [{"content": "import datetime\n\nimport requests\nfrom waste_collection_schedule import Collection\n\n# Include work around for SSL UNSAFE_LEGACY_RENEGOTIATION_DISABLED error\nfrom waste_collection_schedule.service.SSLError import get_legacy_session\n\n\nTITLE = \"Christchurch City Council\"\nDESCRIPTION = \"Source for Christchurch City Council.\"\nURL = \"https://ccc.govt.nz\"\nTEST_CASES = {\"53 Hereford Street\": {\"address\": \"53 Hereford Street\"}}\n\n\nclass Source:\n    def __init__(self, address):\n        self._address = address\n\n    def fetch(self):\n\n        s = get_legacy_session()\n\n        entries = []\n\n        # Find the Rating Unit ID by the physical address\n        # While a property may have more than one address, bins are allocated by each Rating Unit\n        addressQuery = {\n            \"q\": self._address,\n            \"status\": \"current\",\n            \"crs\": \"epsg:4326\",\n            \"limit\": 1,\n        }\n\n        r = s.get(\"https://opendata.ccc.govt.nz/CCCSearch/rest/address/suggest\",\n            params=addressQuery,\n            # verify=False,\n        )\n        address = r.json()\n\n        # Find the Bin service by Rating Unit ID\n        binsHeaders = {\n            \"client_id\": \"69f433c880c74c349b0128e9fa1b6a93\",\n            \"client_secret\": \"139F3D2A83E34AdF98c80566f2eb7212\"\n        }\n\n        # Updated request using SSL code snippet\n        r = s.get(\"https://ccc-data-citizen-api-v1-prod.au-s1.cloudhub.io/api/v1/properties/\" + str(address[0][\"RatingUnitID\"]),\n            headers=binsHeaders\n            # verify=False,\n        )\n        bins = r.json()\n        \n        # Deduplicate the Bins in case the Rating Unit has more than one of the same Bin type\n        bins = {each[\"material\"]: each for each in bins[\"bins\"][\"collections\"]}.values()\n\n        # Process each Bin\n        for bin in bins:\n            entries.append(\n                Collection(\n                    datetime.datetime.strptime(\n                        bin[\"next_planned_date_app\"], \"%Y-%m-%d\"\n                    ).date(),\n                    bin[\"material\"],\n                )\n            )\n\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/ccc_govt_nz.py"}]}