prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Presubmit failure
  If you look into the test it said
  ```
  Traceback (most recent call last):
    File "<string>", line 3, in <module>
    File "/usr/local/lib/python3.6/site-packages/kfp/__init__.py", line 24, in <module>
      from ._client import Client
    File "/usr/local/lib/python3.6/site-packages/kfp/_client.py", line 31, in <module>
      from kfp.compiler import compiler
    File "/usr/local/lib/python3.6/site-packages/kfp/compiler/__init__.py", line 17, in <module>
      from ..containers._component_builder import build_python_component, build_docker_image, VersionedDependency
    File "/usr/local/lib/python3.6/site-packages/kfp/containers/_component_builder.py", line 32, in <module>
      from kfp.containers import entrypoint
    File "/usr/local/lib/python3.6/site-packages/kfp/containers/entrypoint.py", line 23, in <module>
      from kfp.containers import entrypoint_utils
    File "/usr/local/lib/python3.6/site-packages/kfp/containers/entrypoint_utils.py", line 23, in <module>
      from kfp.pipeline_spec import pipeline_spec_pb2
    File "/usr/local/lib/python3.6/site-packages/kfp/pipeline_spec/pipeline_spec_pb2.py", line 23, in <module>
      create_key=_descriptor._internal_create_key,
  AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'
  ```
  
  Looks like the `protobuf` version is not matching in this case. @Bobgy are you aware of this error? Thanks.
  
  _Originally posted by @Tomcli in https://github.com/kubeflow/pipelines/pull/5059#issuecomment-777656530_
  
  /cc @numerology @chensun @Ark-kun 
  Can you take a look at this issue? I have seen multiple reports, this error seems to fail consistently.
  
  </issue>
  <code>
  [start of api/v2alpha1/python/setup.py]
  1 # Copyright 2020 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 import os
  16 import subprocess
  17 import sys
  18 import setuptools
  19 try:
  20   from distutils.spawn import find_executable
  21 except ImportError:
  22   from shutil import which as find_executable
  23 
  24 NAME = "kfp-pipeline-spec"
  25 VERSION = "0.1.5"
  26 
  27 PROTO_DIR = os.path.realpath(
  28     os.path.join(os.path.dirname(__file__), os.pardir))
  29 
  30 PKG_DIR = os.path.realpath(
  31     os.path.join(os.path.dirname(__file__), "kfp", "pipeline_spec"))
  32 
  33 # Find the Protocol Compiler. (Taken from protobuf/python/setup.py)
  34 if "PROTOC" in os.environ and os.path.exists(os.environ["PROTOC"]):
  35   PROTOC = os.environ["PROTOC"]
  36 else:
  37   PROTOC = find_executable("protoc")
  38 
  39 
  40 def GenerateProto(source):
  41   """Generate a _pb2.py from a .proto file.
  42 
  43   Invokes the Protocol Compiler to generate a _pb2.py from the given
  44   .proto file.  Does nothing if the output already exists and is newer than
  45   the input.
  46 
  47   Args:
  48     source: The source proto file that needs to be compiled.
  49   """
  50 
  51   output = source.replace(".proto", "_pb2.py")
  52 
  53   if not os.path.exists(output) or (
  54       os.path.exists(source) and
  55       os.path.getmtime(source) > os.path.getmtime(output)):
  56     print("Generating %s..." % output)
  57 
  58     if not os.path.exists(source):
  59       sys.stderr.write("Can't find required file: %s\n" % source)
  60       sys.exit(-1)
  61 
  62     if PROTOC is None:
  63       sys.stderr.write("protoc is not found.  Please compile it "
  64                        "or install the binary package.\n")
  65       sys.exit(-1)
  66 
  67     protoc_command = [
  68         PROTOC, "-I%s" % PROTO_DIR,
  69         "--python_out=%s" % PKG_DIR, source
  70     ]
  71     if subprocess.call(protoc_command) != 0:
  72       sys.exit(-1)
  73 
  74 
  75 # Generate the protobuf files that we depend on.
  76 GenerateProto(os.path.join(PROTO_DIR, "pipeline_spec.proto"))
  77 
  78 setuptools.setup(
  79     name=NAME,
  80     version=VERSION,
  81     description="Kubeflow Pipelines pipeline spec",
  82     author="google",
  83     author_email="kubeflow-pipelines@google.com",
  84     url="https://github.com/kubeflow/pipelines",
  85     packages=setuptools.find_namespace_packages(include=['kfp.*']),
  86     python_requires=">=3.5.3",
  87     include_package_data=True,
  88     license="Apache 2.0",
  89 )
  90
  [end of api/v2alpha1/python/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/api/v2alpha1/python/setup.py b/api/v2alpha1/python/setup.py
  --- a/api/v2alpha1/python/setup.py
  +++ b/api/v2alpha1/python/setup.py
  @@ -84,6 +84,7 @@
       url="https://github.com/kubeflow/pipelines",
       packages=setuptools.find_namespace_packages(include=['kfp.*']),
       python_requires=">=3.5.3",
  +    install_requires=["protobuf>=3.13.0,<4"],
       include_package_data=True,
       license="Apache 2.0",
   )
  
verification_info: {"golden_diff": "diff --git a/api/v2alpha1/python/setup.py b/api/v2alpha1/python/setup.py\n--- a/api/v2alpha1/python/setup.py\n+++ b/api/v2alpha1/python/setup.py\n@@ -84,6 +84,7 @@\n     url=\"https://github.com/kubeflow/pipelines\",\n     packages=setuptools.find_namespace_packages(include=['kfp.*']),\n     python_requires=\">=3.5.3\",\n+    install_requires=[\"protobuf>=3.13.0,<4\"],\n     include_package_data=True,\n     license=\"Apache 2.0\",\n )\n", "issue": "Presubmit failure\nIf you look into the test it said\r\n```\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 3, in <module>\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/__init__.py\", line 24, in <module>\r\n    from ._client import Client\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/_client.py\", line 31, in <module>\r\n    from kfp.compiler import compiler\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/compiler/__init__.py\", line 17, in <module>\r\n    from ..containers._component_builder import build_python_component, build_docker_image, VersionedDependency\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/containers/_component_builder.py\", line 32, in <module>\r\n    from kfp.containers import entrypoint\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/containers/entrypoint.py\", line 23, in <module>\r\n    from kfp.containers import entrypoint_utils\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/containers/entrypoint_utils.py\", line 23, in <module>\r\n    from kfp.pipeline_spec import pipeline_spec_pb2\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/pipeline_spec/pipeline_spec_pb2.py\", line 23, in <module>\r\n    create_key=_descriptor._internal_create_key,\r\nAttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'\r\n```\r\n\r\nLooks like the `protobuf` version is not matching in this case. @Bobgy are you aware of this error? Thanks.\n\n_Originally posted by @Tomcli in https://github.com/kubeflow/pipelines/pull/5059#issuecomment-777656530_\n\n/cc @numerology @chensun @Ark-kun \nCan you take a look at this issue? I have seen multiple reports, this error seems to fail consistently.\n", "before_files": [{"content": "# Copyright 2020 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\nimport os\nimport subprocess\nimport sys\nimport setuptools\ntry:\n  from distutils.spawn import find_executable\nexcept ImportError:\n  from shutil import which as find_executable\n\nNAME = \"kfp-pipeline-spec\"\nVERSION = \"0.1.5\"\n\nPROTO_DIR = os.path.realpath(\n    os.path.join(os.path.dirname(__file__), os.pardir))\n\nPKG_DIR = os.path.realpath(\n    os.path.join(os.path.dirname(__file__), \"kfp\", \"pipeline_spec\"))\n\n# Find the Protocol Compiler. (Taken from protobuf/python/setup.py)\nif \"PROTOC\" in os.environ and os.path.exists(os.environ[\"PROTOC\"]):\n  PROTOC = os.environ[\"PROTOC\"]\nelse:\n  PROTOC = find_executable(\"protoc\")\n\n\ndef GenerateProto(source):\n  \"\"\"Generate a _pb2.py from a .proto file.\n\n  Invokes the Protocol Compiler to generate a _pb2.py from the given\n  .proto file.  Does nothing if the output already exists and is newer than\n  the input.\n\n  Args:\n    source: The source proto file that needs to be compiled.\n  \"\"\"\n\n  output = source.replace(\".proto\", \"_pb2.py\")\n\n  if not os.path.exists(output) or (\n      os.path.exists(source) and\n      os.path.getmtime(source) > os.path.getmtime(output)):\n    print(\"Generating %s...\" % output)\n\n    if not os.path.exists(source):\n      sys.stderr.write(\"Can't find required file: %s\\n\" % source)\n      sys.exit(-1)\n\n    if PROTOC is None:\n      sys.stderr.write(\"protoc is not found.  Please compile it \"\n                       \"or install the binary package.\\n\")\n      sys.exit(-1)\n\n    protoc_command = [\n        PROTOC, \"-I%s\" % PROTO_DIR,\n        \"--python_out=%s\" % PKG_DIR, source\n    ]\n    if subprocess.call(protoc_command) != 0:\n      sys.exit(-1)\n\n\n# Generate the protobuf files that we depend on.\nGenerateProto(os.path.join(PROTO_DIR, \"pipeline_spec.proto\"))\n\nsetuptools.setup(\n    name=NAME,\n    version=VERSION,\n    description=\"Kubeflow Pipelines pipeline spec\",\n    author=\"google\",\n    author_email=\"kubeflow-pipelines@google.com\",\n    url=\"https://github.com/kubeflow/pipelines\",\n    packages=setuptools.find_namespace_packages(include=['kfp.*']),\n    python_requires=\">=3.5.3\",\n    include_package_data=True,\n    license=\"Apache 2.0\",\n)\n", "path": "api/v2alpha1/python/setup.py"}]}