prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  azure - unpinn EventGrid SDK version
  We need AdvancedFilters to be added to the stable version.
  
  https://pypi.org/project/azure-mgmt-eventgrid/
  
  </issue>
  <code>
  [start of tools/c7n_azure/setup.py]
  1 # Copyright 2018 Capital One Services, LLC
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 # http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 from io import open
  16 from os import path
  17 from setuptools import setup, find_packages
  18 
  19 # read the contents of your README file
  20 this_directory = path.abspath(path.dirname(__file__))
  21 readme = path.join(this_directory, 'readme.md')
  22 long_description = ''
  23 if path.exists(readme):
  24     with open(readme, encoding='utf-8') as f:
  25         long_description = f.read()
  26 
  27 setup(
  28     name="c7n_azure",
  29     version='0.5.3',
  30     description="Cloud Custodian - Azure Support",
  31     long_description=long_description,
  32     long_description_content_type='text/markdown',
  33     classifiers=[
  34         "Topic :: System :: Systems Administration",
  35         "Topic :: System :: Distributed Computing"
  36     ],
  37     url="https://github.com/cloud-custodian/cloud-custodian",
  38     license="Apache-2.0",
  39     packages=find_packages(),
  40     entry_points={
  41         "custodian.resources": [
  42             'azure = c7n_azure.entry:initialize_azure']
  43     },
  44     install_requires=["azure-mgmt-authorization",
  45                       "azure-mgmt-applicationinsights==0.1.1",
  46                       "azure-mgmt-batch",
  47                       "azure-mgmt-cognitiveservices",
  48                       "azure-mgmt-cosmosdb",
  49                       "azure-mgmt-compute",
  50                       "azure-mgmt-cdn",
  51                       "azure-mgmt-containerregistry",
  52                       "azure-mgmt-containerservice",
  53                       "azure-mgmt-datalake-store",
  54                       "azure-mgmt-datafactory",
  55                       "azure-mgmt-iothub",
  56                       "azure-mgmt-keyvault",
  57                       "azure-mgmt-managementgroups",
  58                       "azure-mgmt-network",
  59                       "azure-mgmt-redis",
  60                       "azure-mgmt-resource==2.1.0",
  61                       "azure-mgmt-sql",
  62                       "azure-mgmt-storage",
  63                       "azure-mgmt-web",
  64                       "azure-mgmt-monitor",
  65                       "azure-mgmt-policyinsights",
  66                       "azure-mgmt-eventgrid==2.0.0rc2",  # RC2 supports AdvancedFilters
  67                       "azure-graphrbac",
  68                       "azure-keyvault",
  69                       "azure-storage-blob",
  70                       "azure-storage-queue",
  71                       "distlib",
  72                       "requests",
  73                       "PyJWT",
  74                       "c7n",
  75                       "requests",
  76                       "azure-cli-core",
  77                       "adal",
  78                       "backports.functools_lru_cache",
  79                       "futures>=3.1.1",
  80                       "netaddr"],
  81     package_data={str(''): [str('function_binding_resources/bin/*.dll'),
  82                             str('function_binding_resources/*.csproj'),
  83                             str('function_binding_resources/bin/*.json')]}
  84 )
  85
  [end of tools/c7n_azure/setup.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/tools/c7n_azure/setup.py b/tools/c7n_azure/setup.py
  --- a/tools/c7n_azure/setup.py
  +++ b/tools/c7n_azure/setup.py
  @@ -63,7 +63,7 @@
                         "azure-mgmt-web",
                         "azure-mgmt-monitor",
                         "azure-mgmt-policyinsights",
  -                      "azure-mgmt-eventgrid==2.0.0rc2",  # RC2 supports AdvancedFilters
  +                      "azure-mgmt-eventgrid",
                         "azure-graphrbac",
                         "azure-keyvault",
                         "azure-storage-blob",
  
verification_info: {"golden_diff": "diff --git a/tools/c7n_azure/setup.py b/tools/c7n_azure/setup.py\n--- a/tools/c7n_azure/setup.py\n+++ b/tools/c7n_azure/setup.py\n@@ -63,7 +63,7 @@\n                       \"azure-mgmt-web\",\n                       \"azure-mgmt-monitor\",\n                       \"azure-mgmt-policyinsights\",\n-                      \"azure-mgmt-eventgrid==2.0.0rc2\",  # RC2 supports AdvancedFilters\n+                      \"azure-mgmt-eventgrid\",\n                       \"azure-graphrbac\",\n                       \"azure-keyvault\",\n                       \"azure-storage-blob\",\n", "issue": "azure - unpinn EventGrid SDK version\nWe need AdvancedFilters to be added to the stable version.\r\n\r\nhttps://pypi.org/project/azure-mgmt-eventgrid/\n", "before_files": [{"content": "# Copyright 2018 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom io import open\nfrom os import path\nfrom setuptools import setup, find_packages\n\n# read the contents of your README file\nthis_directory = path.abspath(path.dirname(__file__))\nreadme = path.join(this_directory, 'readme.md')\nlong_description = ''\nif path.exists(readme):\n    with open(readme, encoding='utf-8') as f:\n        long_description = f.read()\n\nsetup(\n    name=\"c7n_azure\",\n    version='0.5.3',\n    description=\"Cloud Custodian - Azure Support\",\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    classifiers=[\n        \"Topic :: System :: Systems Administration\",\n        \"Topic :: System :: Distributed Computing\"\n    ],\n    url=\"https://github.com/cloud-custodian/cloud-custodian\",\n    license=\"Apache-2.0\",\n    packages=find_packages(),\n    entry_points={\n        \"custodian.resources\": [\n            'azure = c7n_azure.entry:initialize_azure']\n    },\n    install_requires=[\"azure-mgmt-authorization\",\n                      \"azure-mgmt-applicationinsights==0.1.1\",\n                      \"azure-mgmt-batch\",\n                      \"azure-mgmt-cognitiveservices\",\n                      \"azure-mgmt-cosmosdb\",\n                      \"azure-mgmt-compute\",\n                      \"azure-mgmt-cdn\",\n                      \"azure-mgmt-containerregistry\",\n                      \"azure-mgmt-containerservice\",\n                      \"azure-mgmt-datalake-store\",\n                      \"azure-mgmt-datafactory\",\n                      \"azure-mgmt-iothub\",\n                      \"azure-mgmt-keyvault\",\n                      \"azure-mgmt-managementgroups\",\n                      \"azure-mgmt-network\",\n                      \"azure-mgmt-redis\",\n                      \"azure-mgmt-resource==2.1.0\",\n                      \"azure-mgmt-sql\",\n                      \"azure-mgmt-storage\",\n                      \"azure-mgmt-web\",\n                      \"azure-mgmt-monitor\",\n                      \"azure-mgmt-policyinsights\",\n                      \"azure-mgmt-eventgrid==2.0.0rc2\",  # RC2 supports AdvancedFilters\n                      \"azure-graphrbac\",\n                      \"azure-keyvault\",\n                      \"azure-storage-blob\",\n                      \"azure-storage-queue\",\n                      \"distlib\",\n                      \"requests\",\n                      \"PyJWT\",\n                      \"c7n\",\n                      \"requests\",\n                      \"azure-cli-core\",\n                      \"adal\",\n                      \"backports.functools_lru_cache\",\n                      \"futures>=3.1.1\",\n                      \"netaddr\"],\n    package_data={str(''): [str('function_binding_resources/bin/*.dll'),\n                            str('function_binding_resources/*.csproj'),\n                            str('function_binding_resources/bin/*.json')]}\n)\n", "path": "tools/c7n_azure/setup.py"}]}