prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Re-generate library using tasks/synth.py
  This PR was created by autosynth.
  
  </issue>
  <code>
  [start of tasks/synth.py]
  1 # Copyright 2018 Google 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 """This script is used to synthesize generated parts of this library."""
  16 
  17 import synthtool as s
  18 import synthtool.gcp as gcp
  19 import logging
  20 
  21 logging.basicConfig(level=logging.DEBUG)
  22 
  23 gapic = gcp.GAPICGenerator()
  24 common = gcp.CommonTemplates()
  25 excludes = [
  26     'README.rst',
  27     'setup.py',
  28     'docs/conf.py',
  29     'docs/index.rst',
  30 ]
  31 
  32 for version in ['v2beta2', 'v2beta3']:
  33     library = gapic.py_library(
  34         'tasks', version,
  35         config_path=f'artman_cloudtasks_{version}.yaml')
  36 
  37     s.copy(library, excludes=excludes)
  38 
  39     # Fix unindentation of bullet list second line
  40     s.replace(
  41         f'google/cloud/tasks_{version}/gapic/cloud_tasks_client.py',
  42         '(        \* .*\n        )([^\s*])',
  43         '\g<1>  \g<2>')
  44 
  45     s.replace(
  46         f'google/cloud/tasks_{version}/gapic/cloud_tasks_client.py',
  47         '(Google IAM .*?_) ',
  48         '\g<1>_ ')
  49 
  50     # Issues with Anonymous ('__') links. Change to named.
  51     s.replace(
  52         f"google/cloud/tasks_{version}/proto/*.py",
  53         ">`__",
  54         ">`_")
  55 
  56 # Issue in v2beta2
  57 s.replace(
  58     f'google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py',
  59     r'(Sample filter \\"app_engine_http_target: )\*\\".',
  60     '\g<1>\\*\\".')
  61 
  62 # Wrapped link fails due to space in link (v2beta2)
  63 s.replace(
  64     f"google/cloud/tasks_v2beta2/proto/queue_pb2.py",
  65     '(uests in queue.yaml/xml) <\n\s+',
  66     '\g<1>\n          <')
  67
  [end of tasks/synth.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/tasks/synth.py b/tasks/synth.py
  --- a/tasks/synth.py
  +++ b/tasks/synth.py
  @@ -25,6 +25,7 @@
   excludes = [
       'README.rst',
       'setup.py',
  +    'nox*.py',
       'docs/conf.py',
       'docs/index.rst',
   ]
  
verification_info: {"golden_diff": "diff --git a/tasks/synth.py b/tasks/synth.py\n--- a/tasks/synth.py\n+++ b/tasks/synth.py\n@@ -25,6 +25,7 @@\n excludes = [\n     'README.rst',\n     'setup.py',\n+    'nox*.py',\n     'docs/conf.py',\n     'docs/index.rst',\n ]\n", "issue": "Re-generate library using tasks/synth.py\nThis PR was created by autosynth.\n", "before_files": [{"content": "# Copyright 2018 Google 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\n\"\"\"This script is used to synthesize generated parts of this library.\"\"\"\n\nimport synthtool as s\nimport synthtool.gcp as gcp\nimport logging\n\nlogging.basicConfig(level=logging.DEBUG)\n\ngapic = gcp.GAPICGenerator()\ncommon = gcp.CommonTemplates()\nexcludes = [\n    'README.rst',\n    'setup.py',\n    'docs/conf.py',\n    'docs/index.rst',\n]\n\nfor version in ['v2beta2', 'v2beta3']:\n    library = gapic.py_library(\n        'tasks', version,\n        config_path=f'artman_cloudtasks_{version}.yaml')\n\n    s.copy(library, excludes=excludes)\n\n    # Fix unindentation of bullet list second line\n    s.replace(\n        f'google/cloud/tasks_{version}/gapic/cloud_tasks_client.py',\n        '(        \\* .*\\n        )([^\\s*])',\n        '\\g<1>  \\g<2>')\n\n    s.replace(\n        f'google/cloud/tasks_{version}/gapic/cloud_tasks_client.py',\n        '(Google IAM .*?_) ',\n        '\\g<1>_ ')\n\n    # Issues with Anonymous ('__') links. Change to named.\n    s.replace(\n        f\"google/cloud/tasks_{version}/proto/*.py\",\n        \">`__\",\n        \">`_\")\n\n# Issue in v2beta2\ns.replace(\n    f'google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py',\n    r'(Sample filter \\\\\"app_engine_http_target: )\\*\\\\\".',\n    '\\g<1>\\\\*\\\\\".')\n\n# Wrapped link fails due to space in link (v2beta2)\ns.replace(\n    f\"google/cloud/tasks_v2beta2/proto/queue_pb2.py\",\n    '(uests in queue.yaml/xml) <\\n\\s+',\n    '\\g<1>\\n          <')\n", "path": "tasks/synth.py"}]}