prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Poundland spider returning Pep&Co only stores as both Poundland and Pep&Co
  Poundland has a clothing brand called "Pep&Co", and typically their larger stores have a "Pep&Co" area inside, looking a bit like a concession in a department store. In their storefinder data, these stores are indicated by a "Pep Shop" flag. The ATP poundland.py spider looks for this, and when it's found generates an additional "Pep&Co" store item in addition to the "Poundland" one.
  
  So far so good. However, it appears that there are also a few (about 14) "Pep&Co" stores that aren't also regular Poundland stores. For example, these can occur in shopping centres, where Poundland is renting two nearby units and using one as a regular Poundland store (without Pep&Co) and the other as a Pep&Co only store. Currently ATP is returning a "Poundland" entry for the  "Pep&Co" only store. Since there's a separate entry in the storefinder for the actual Poundland store, this leads to duplicates.
  
  Here's an example mapped in OSM:
  Poundland - https://www.openstreetmap.org/node/11293224534 - CV21 2JT
  Pep&Co - https://www.openstreetmap.org/node/11293224520 - CV21 2JS
  
  Another (unmapped example) is two stores with postcode TS8 0TJ.
  
  I think these  "Pep&Co" only stores can be detected by the branch name (stored in item["branch"]) starting with "Pep & Co". I guess we should test for this, and then not yield the final item if it's found. (In case there's any inconsistency in their data, it would probably be good to add the same test to the` if "Pep Shop" in ` line as an alternative. This would ensure that we don't completely drop a branch who's name starts with "Pep&Co" but doesn't have the "Pep shop" flag set.
  
  </issue>
  <code>
  [start of locations/spiders/poundland.py]
  1 from locations.categories import Extras, apply_yes_no
  2 from locations.items import Feature
  3 from locations.storefinders.woosmap import WoosmapSpider
  4 
  5 
  6 class PoundlandSpider(WoosmapSpider):
  7     name = "poundland"
  8     item_attributes = {"brand": "Poundland", "brand_wikidata": "Q1434528"}
  9     key = "woos-4108db5c-39f8-360b-9b7e-102c38034b94"
  10     origin = "https://www.poundland.co.uk"
  11 
  12     def parse_item(self, item: Feature, feature: dict, **kwargs):
  13         item["branch"] = item.pop("name")
  14 
  15         if "Pep Shop" in feature["properties"]["tags"]:
  16             pep = item.deepcopy()
  17 
  18             pep["ref"] = pep["ref"] + "_pep"
  19 
  20             pep["brand"] = "Pep&Co"
  21             pep["brand_wikidata"] = "Q24908166"
  22 
  23             pep["located_in"] = self.item_attributes["brand"]
  24             pep["located_in_wikidata"] = self.item_attributes["brand_wikidata"]
  25 
  26             yield pep
  27 
  28         apply_yes_no(Extras.ATM, item, "ATM" in feature["properties"]["tags"])
  29         item["extras"]["icestore"] = "yes" if "Ice Store" in feature["properties"]["tags"] else "no"
  30 
  31         yield item
  32
  [end of locations/spiders/poundland.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/poundland.py b/locations/spiders/poundland.py
  --- a/locations/spiders/poundland.py
  +++ b/locations/spiders/poundland.py
  @@ -12,7 +12,7 @@
       def parse_item(self, item: Feature, feature: dict, **kwargs):
           item["branch"] = item.pop("name")
   
  -        if "Pep Shop" in feature["properties"]["tags"]:
  +        if "Pep Shop" in feature["properties"]["tags"] or item["branch"].startswith("Pep & Co "):
               pep = item.deepcopy()
   
               pep["ref"] = pep["ref"] + "_pep"
  @@ -25,6 +25,9 @@
   
               yield pep
   
  +        if item["branch"].startswith("Pep & Co "):
  +            return
  +
           apply_yes_no(Extras.ATM, item, "ATM" in feature["properties"]["tags"])
           item["extras"]["icestore"] = "yes" if "Ice Store" in feature["properties"]["tags"] else "no"
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/poundland.py b/locations/spiders/poundland.py\n--- a/locations/spiders/poundland.py\n+++ b/locations/spiders/poundland.py\n@@ -12,7 +12,7 @@\n     def parse_item(self, item: Feature, feature: dict, **kwargs):\n         item[\"branch\"] = item.pop(\"name\")\n \n-        if \"Pep Shop\" in feature[\"properties\"][\"tags\"]:\n+        if \"Pep Shop\" in feature[\"properties\"][\"tags\"] or item[\"branch\"].startswith(\"Pep & Co \"):\n             pep = item.deepcopy()\n \n             pep[\"ref\"] = pep[\"ref\"] + \"_pep\"\n@@ -25,6 +25,9 @@\n \n             yield pep\n \n+        if item[\"branch\"].startswith(\"Pep & Co \"):\n+            return\n+\n         apply_yes_no(Extras.ATM, item, \"ATM\" in feature[\"properties\"][\"tags\"])\n         item[\"extras\"][\"icestore\"] = \"yes\" if \"Ice Store\" in feature[\"properties\"][\"tags\"] else \"no\"\n", "issue": "Poundland spider returning Pep&Co only stores as both Poundland and Pep&Co\nPoundland has a clothing brand called \"Pep&Co\", and typically their larger stores have a \"Pep&Co\" area inside, looking a bit like a concession in a department store. In their storefinder data, these stores are indicated by a \"Pep Shop\" flag. The ATP poundland.py spider looks for this, and when it's found generates an additional \"Pep&Co\" store item in addition to the \"Poundland\" one.\r\n\r\nSo far so good. However, it appears that there are also a few (about 14) \"Pep&Co\" stores that aren't also regular Poundland stores. For example, these can occur in shopping centres, where Poundland is renting two nearby units and using one as a regular Poundland store (without Pep&Co) and the other as a Pep&Co only store. Currently ATP is returning a \"Poundland\" entry for the  \"Pep&Co\" only store. Since there's a separate entry in the storefinder for the actual Poundland store, this leads to duplicates.\r\n\r\nHere's an example mapped in OSM:\r\nPoundland - https://www.openstreetmap.org/node/11293224534 - CV21 2JT\r\nPep&Co - https://www.openstreetmap.org/node/11293224520 - CV21 2JS\r\n\r\nAnother (unmapped example) is two stores with postcode TS8 0TJ.\r\n\r\nI think these  \"Pep&Co\" only stores can be detected by the branch name (stored in item[\"branch\"]) starting with \"Pep & Co\". I guess we should test for this, and then not yield the final item if it's found. (In case there's any inconsistency in their data, it would probably be good to add the same test to the` if \"Pep Shop\" in ` line as an alternative. This would ensure that we don't completely drop a branch who's name starts with \"Pep&Co\" but doesn't have the \"Pep shop\" flag set.\n", "before_files": [{"content": "from locations.categories import Extras, apply_yes_no\nfrom locations.items import Feature\nfrom locations.storefinders.woosmap import WoosmapSpider\n\n\nclass PoundlandSpider(WoosmapSpider):\n    name = \"poundland\"\n    item_attributes = {\"brand\": \"Poundland\", \"brand_wikidata\": \"Q1434528\"}\n    key = \"woos-4108db5c-39f8-360b-9b7e-102c38034b94\"\n    origin = \"https://www.poundland.co.uk\"\n\n    def parse_item(self, item: Feature, feature: dict, **kwargs):\n        item[\"branch\"] = item.pop(\"name\")\n\n        if \"Pep Shop\" in feature[\"properties\"][\"tags\"]:\n            pep = item.deepcopy()\n\n            pep[\"ref\"] = pep[\"ref\"] + \"_pep\"\n\n            pep[\"brand\"] = \"Pep&Co\"\n            pep[\"brand_wikidata\"] = \"Q24908166\"\n\n            pep[\"located_in\"] = self.item_attributes[\"brand\"]\n            pep[\"located_in_wikidata\"] = self.item_attributes[\"brand_wikidata\"]\n\n            yield pep\n\n        apply_yes_no(Extras.ATM, item, \"ATM\" in feature[\"properties\"][\"tags\"])\n        item[\"extras\"][\"icestore\"] = \"yes\" if \"Ice Store\" in feature[\"properties\"][\"tags\"] else \"no\"\n\n        yield item\n", "path": "locations/spiders/poundland.py"}]}