prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  BMO Harris Bank
  https://branchlocator.bmoharris.com/
  
  </issue>
  <code>
  [start of locations/spiders/bmo_harris.py]
  1 import html
  2 import json
  3 import scrapy
  4 
  5 from locations.items import GeojsonPointItem
  6 from locations.hours import OpeningHours
  7 
  8 
  9 class BMOHarrisSpider(scrapy.Spider):
  10     name = "bmo-harris"
  11     item_attributes = { 'brand': "BMO Harris Bank" }
  12     allowed_domains = ["branches.bmoharris.com"]
  13     download_delay = 0.5
  14     start_urls = (
  15         'https://branches.bmoharris.com/',
  16     )
  17 
  18     def parse_store(self, response):
  19         properties = {
  20             'addr_full': response.xpath('//meta[@property="business:contact_data:street_address"]/@content').extract_first(),
  21             'phone': response.xpath('//meta[@property="business:contact_data:phone_number"]/@content').extract_first(),
  22             'city': response.xpath('//meta[@property="business:contact_data:locality"]/@content').extract_first(),
  23             'state': response.xpath('//meta[@property="business:contact_data:region"]/@content').extract_first(),
  24             'postcode': response.xpath('//meta[@property="business:contact_data:postal_code"]/@content').extract_first(),
  25             'country': response.xpath('//meta[@property="business:contact_data:country_name"]/@content').extract_first(),
  26             'ref': response.url,
  27             'website': response.url,
  28             'lat': response.xpath('//meta[@property="place:location:latitude"]/@content').extract_first(),
  29             'lon': response.xpath('//meta[@property="place:location:longitude"]/@content').extract_first(),
  30         }
  31 
  32         yield GeojsonPointItem(**properties)
  33 
  34     def parse(self, response):
  35         # Step into hierarchy of place
  36         for url in response.xpath("//div[@class='itemlist']/p/a/@href").extract():
  37             yield scrapy.Request(response.urljoin(url))
  38 
  39         # Look for links to stores
  40         for url in response.xpath("//div[@class='itemlist']/li/span[@itemprop='streetAddress']/a/@href").extract():
  41             yield scrapy.Request(response.urljoin(url), callback=self.parse_store)
  42
  [end of locations/spiders/bmo_harris.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/locations/spiders/bmo_harris.py b/locations/spiders/bmo_harris.py
  --- a/locations/spiders/bmo_harris.py
  +++ b/locations/spiders/bmo_harris.py
  @@ -7,13 +7,14 @@
   
   
   class BMOHarrisSpider(scrapy.Spider):
  -    name = "bmo-harris"
  -    item_attributes = { 'brand': "BMO Harris Bank" }
  +    name = "bmo_harris"
  +    item_attributes = {'brand': "BMO Harris Bank", 'brand_wikidata': "Q4835981"}
       allowed_domains = ["branches.bmoharris.com"]
       download_delay = 0.5
       start_urls = (
           'https://branches.bmoharris.com/',
       )
  +    user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36'
   
       def parse_store(self, response):
           properties = {
  @@ -33,9 +34,9 @@
   
       def parse(self, response):
           # Step into hierarchy of place
  -        for url in response.xpath("//div[@class='itemlist']/p/a/@href").extract():
  +        for url in response.xpath("//ul[@class='itemlist']/li/a/@href").extract():
               yield scrapy.Request(response.urljoin(url))
   
           # Look for links to stores
  -        for url in response.xpath("//div[@class='itemlist']/li/span[@itemprop='streetAddress']/a/@href").extract():
  +        for url in response.xpath("//ul[@class='itemlist']/li/div/span[@itemprop='streetAddress']/a/@href").extract():
               yield scrapy.Request(response.urljoin(url), callback=self.parse_store)
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/bmo_harris.py b/locations/spiders/bmo_harris.py\n--- a/locations/spiders/bmo_harris.py\n+++ b/locations/spiders/bmo_harris.py\n@@ -7,13 +7,14 @@\n \n \n class BMOHarrisSpider(scrapy.Spider):\n-    name = \"bmo-harris\"\n-    item_attributes = { 'brand': \"BMO Harris Bank\" }\n+    name = \"bmo_harris\"\n+    item_attributes = {'brand': \"BMO Harris Bank\", 'brand_wikidata': \"Q4835981\"}\n     allowed_domains = [\"branches.bmoharris.com\"]\n     download_delay = 0.5\n     start_urls = (\n         'https://branches.bmoharris.com/',\n     )\n+    user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36'\n \n     def parse_store(self, response):\n         properties = {\n@@ -33,9 +34,9 @@\n \n     def parse(self, response):\n         # Step into hierarchy of place\n-        for url in response.xpath(\"//div[@class='itemlist']/p/a/@href\").extract():\n+        for url in response.xpath(\"//ul[@class='itemlist']/li/a/@href\").extract():\n             yield scrapy.Request(response.urljoin(url))\n \n         # Look for links to stores\n-        for url in response.xpath(\"//div[@class='itemlist']/li/span[@itemprop='streetAddress']/a/@href\").extract():\n+        for url in response.xpath(\"//ul[@class='itemlist']/li/div/span[@itemprop='streetAddress']/a/@href\").extract():\n             yield scrapy.Request(response.urljoin(url), callback=self.parse_store)\n", "issue": "BMO Harris Bank\nhttps://branchlocator.bmoharris.com/\n", "before_files": [{"content": "import html\nimport json\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass BMOHarrisSpider(scrapy.Spider):\n    name = \"bmo-harris\"\n    item_attributes = { 'brand': \"BMO Harris Bank\" }\n    allowed_domains = [\"branches.bmoharris.com\"]\n    download_delay = 0.5\n    start_urls = (\n        'https://branches.bmoharris.com/',\n    )\n\n    def parse_store(self, response):\n        properties = {\n            'addr_full': response.xpath('//meta[@property=\"business:contact_data:street_address\"]/@content').extract_first(),\n            'phone': response.xpath('//meta[@property=\"business:contact_data:phone_number\"]/@content').extract_first(),\n            'city': response.xpath('//meta[@property=\"business:contact_data:locality\"]/@content').extract_first(),\n            'state': response.xpath('//meta[@property=\"business:contact_data:region\"]/@content').extract_first(),\n            'postcode': response.xpath('//meta[@property=\"business:contact_data:postal_code\"]/@content').extract_first(),\n            'country': response.xpath('//meta[@property=\"business:contact_data:country_name\"]/@content').extract_first(),\n            'ref': response.url,\n            'website': response.url,\n            'lat': response.xpath('//meta[@property=\"place:location:latitude\"]/@content').extract_first(),\n            'lon': response.xpath('//meta[@property=\"place:location:longitude\"]/@content').extract_first(),\n        }\n\n        yield GeojsonPointItem(**properties)\n\n    def parse(self, response):\n        # Step into hierarchy of place\n        for url in response.xpath(\"//div[@class='itemlist']/p/a/@href\").extract():\n            yield scrapy.Request(response.urljoin(url))\n\n        # Look for links to stores\n        for url in response.xpath(\"//div[@class='itemlist']/li/span[@itemprop='streetAddress']/a/@href\").extract():\n            yield scrapy.Request(response.urljoin(url), callback=self.parse_store)\n", "path": "locations/spiders/bmo_harris.py"}]}