prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spelling Error (_medical_likeliehood)
  _medical_likeliehood -> _medical_likelihood
  
  https://github.com/GoogleCloudPlatform/google-cloud-python/blob/b28a4eb667ae08c3f4dcf9af891ed4931884989c/vision/google/cloud/vision/safe_search.py#L43
  
  </issue>
  <code>
  [start of vision/google/cloud/vision/safe_search.py]
  1 # Copyright 2017 Google Inc.
  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 """Safe search class for information returned from annotating an image."""
  16 
  17 from google.cloud.vision.likelihood import _get_pb_likelihood
  18 from google.cloud.vision.likelihood import Likelihood
  19 
  20 
  21 class SafeSearchAnnotation(object):
  22     """Representation of a SafeSearchAnnotation.
  23 
  24     :type adult_likelihood: :class:`~google.cloud.vision.likelihood.Likelihood`
  25     :param adult_likelihood: Likelihood that image contains adult material.
  26 
  27     :type spoof_likelihood: :class:`~google.cloud.vision.likelihood.Likelihood`
  28     :param spoof_likelihood: Likelihood that image is a spoof.
  29 
  30     :type medical_likelihood:
  31         :class:`~google.cloud.vision.likelihood.Likelihood`
  32     :param medical_likelihood: Likelihood that image contains medical material.
  33 
  34     :type violence_likelihood:
  35         :class:`~google.cloud.vision.likelihood.Likelihood`
  36     :param violence_likelihood: Likelihood that image contains violence.
  37     """
  38 
  39     def __init__(self, adult_likelihood, spoof_likelihood, medical_likelihood,
  40                  violence_likelihood):
  41         self._adult_likelihood = adult_likelihood
  42         self._spoof_likelihood = spoof_likelihood
  43         self._medical_likeliehood = medical_likelihood
  44         self._violence_likelihood = violence_likelihood
  45 
  46     @classmethod
  47     def from_api_repr(cls, response):
  48         """Factory: construct SafeSearchAnnotation from Vision API response.
  49 
  50         :type response: dict
  51         :param response: Dictionary response from Vision API with safe search
  52                          data.
  53 
  54         :rtype: :class:`~google.cloud.vision.safe_search.SafeSearchAnnotation`
  55         :returns: Instance of ``SafeSearchAnnotation``.
  56         """
  57         adult_likelihood = Likelihood[response['adult']]
  58         spoof_likelihood = Likelihood[response['spoof']]
  59         medical_likelihood = Likelihood[response['medical']]
  60         violence_likelihood = Likelihood[response['violence']]
  61 
  62         return cls(adult_likelihood, spoof_likelihood, medical_likelihood,
  63                    violence_likelihood)
  64 
  65     @classmethod
  66     def from_pb(cls, image):
  67         """Factory: construct SafeSearchAnnotation from Vision API response.
  68 
  69         :type image: :class:`~google.cloud.vision_v1.proto.\
  70                       image_annotator_pb2.SafeSearchAnnotation`
  71         :param image: Protobuf response from Vision API with safe search data.
  72 
  73         :rtype: :class:`~google.cloud.vision.safe_search.SafeSearchAnnotation`
  74         :returns: Instance of ``SafeSearchAnnotation``.
  75         """
  76         values = [image.adult, image.spoof, image.medical, image.violence]
  77         classifications = map(_get_pb_likelihood, values)
  78         return cls(*classifications)
  79 
  80     @property
  81     def adult(self):
  82         """Represents the adult contents likelihood for the image.
  83 
  84         :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`
  85         :returns: ``Likelihood`` of the image containing adult content.
  86         """
  87         return self._adult_likelihood
  88 
  89     @property
  90     def spoof(self):
  91         """The likelihood that an obvious modification was made to the image.
  92 
  93         :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`
  94         :returns: The ``Likelihood`` that an obvious modification was made to
  95                   the image's canonical version to make it appear funny or
  96                   offensive.
  97         """
  98         return self._spoof_likelihood
  99 
  100     @property
  101     def medical(self):
  102         """Likelihood this is a medical image.
  103 
  104         :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`
  105         :returns: The ``Likelihood`` that the image is medical in origin.
  106         """
  107         return self._medical_likeliehood
  108 
  109     @property
  110     def violence(self):
  111         """Likeliehood that this image contains violence.
  112 
  113         :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`
  114         :returns: The ``Likelihood`` that the image contains violence.
  115         """
  116         return self._violence_likelihood
  117
  [end of vision/google/cloud/vision/safe_search.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/vision/google/cloud/vision/safe_search.py b/vision/google/cloud/vision/safe_search.py
  --- a/vision/google/cloud/vision/safe_search.py
  +++ b/vision/google/cloud/vision/safe_search.py
  @@ -40,7 +40,7 @@
                    violence_likelihood):
           self._adult_likelihood = adult_likelihood
           self._spoof_likelihood = spoof_likelihood
  -        self._medical_likeliehood = medical_likelihood
  +        self._medical_likelihood = medical_likelihood
           self._violence_likelihood = violence_likelihood
   
       @classmethod
  @@ -104,7 +104,7 @@
           :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`
           :returns: The ``Likelihood`` that the image is medical in origin.
           """
  -        return self._medical_likeliehood
  +        return self._medical_likelihood
   
       @property
       def violence(self):
  
verification_info: {"golden_diff": "diff --git a/vision/google/cloud/vision/safe_search.py b/vision/google/cloud/vision/safe_search.py\n--- a/vision/google/cloud/vision/safe_search.py\n+++ b/vision/google/cloud/vision/safe_search.py\n@@ -40,7 +40,7 @@\n                  violence_likelihood):\n         self._adult_likelihood = adult_likelihood\n         self._spoof_likelihood = spoof_likelihood\n-        self._medical_likeliehood = medical_likelihood\n+        self._medical_likelihood = medical_likelihood\n         self._violence_likelihood = violence_likelihood\n \n     @classmethod\n@@ -104,7 +104,7 @@\n         :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`\n         :returns: The ``Likelihood`` that the image is medical in origin.\n         \"\"\"\n-        return self._medical_likeliehood\n+        return self._medical_likelihood\n \n     @property\n     def violence(self):\n", "issue": "Spelling Error (_medical_likeliehood)\n_medical_likeliehood -> _medical_likelihood\r\n\r\nhttps://github.com/GoogleCloudPlatform/google-cloud-python/blob/b28a4eb667ae08c3f4dcf9af891ed4931884989c/vision/google/cloud/vision/safe_search.py#L43\n", "before_files": [{"content": "# Copyright 2017 Google Inc.\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\"\"\"Safe search class for information returned from annotating an image.\"\"\"\n\nfrom google.cloud.vision.likelihood import _get_pb_likelihood\nfrom google.cloud.vision.likelihood import Likelihood\n\n\nclass SafeSearchAnnotation(object):\n    \"\"\"Representation of a SafeSearchAnnotation.\n\n    :type adult_likelihood: :class:`~google.cloud.vision.likelihood.Likelihood`\n    :param adult_likelihood: Likelihood that image contains adult material.\n\n    :type spoof_likelihood: :class:`~google.cloud.vision.likelihood.Likelihood`\n    :param spoof_likelihood: Likelihood that image is a spoof.\n\n    :type medical_likelihood:\n        :class:`~google.cloud.vision.likelihood.Likelihood`\n    :param medical_likelihood: Likelihood that image contains medical material.\n\n    :type violence_likelihood:\n        :class:`~google.cloud.vision.likelihood.Likelihood`\n    :param violence_likelihood: Likelihood that image contains violence.\n    \"\"\"\n\n    def __init__(self, adult_likelihood, spoof_likelihood, medical_likelihood,\n                 violence_likelihood):\n        self._adult_likelihood = adult_likelihood\n        self._spoof_likelihood = spoof_likelihood\n        self._medical_likeliehood = medical_likelihood\n        self._violence_likelihood = violence_likelihood\n\n    @classmethod\n    def from_api_repr(cls, response):\n        \"\"\"Factory: construct SafeSearchAnnotation from Vision API response.\n\n        :type response: dict\n        :param response: Dictionary response from Vision API with safe search\n                         data.\n\n        :rtype: :class:`~google.cloud.vision.safe_search.SafeSearchAnnotation`\n        :returns: Instance of ``SafeSearchAnnotation``.\n        \"\"\"\n        adult_likelihood = Likelihood[response['adult']]\n        spoof_likelihood = Likelihood[response['spoof']]\n        medical_likelihood = Likelihood[response['medical']]\n        violence_likelihood = Likelihood[response['violence']]\n\n        return cls(adult_likelihood, spoof_likelihood, medical_likelihood,\n                   violence_likelihood)\n\n    @classmethod\n    def from_pb(cls, image):\n        \"\"\"Factory: construct SafeSearchAnnotation from Vision API response.\n\n        :type image: :class:`~google.cloud.vision_v1.proto.\\\n                      image_annotator_pb2.SafeSearchAnnotation`\n        :param image: Protobuf response from Vision API with safe search data.\n\n        :rtype: :class:`~google.cloud.vision.safe_search.SafeSearchAnnotation`\n        :returns: Instance of ``SafeSearchAnnotation``.\n        \"\"\"\n        values = [image.adult, image.spoof, image.medical, image.violence]\n        classifications = map(_get_pb_likelihood, values)\n        return cls(*classifications)\n\n    @property\n    def adult(self):\n        \"\"\"Represents the adult contents likelihood for the image.\n\n        :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`\n        :returns: ``Likelihood`` of the image containing adult content.\n        \"\"\"\n        return self._adult_likelihood\n\n    @property\n    def spoof(self):\n        \"\"\"The likelihood that an obvious modification was made to the image.\n\n        :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`\n        :returns: The ``Likelihood`` that an obvious modification was made to\n                  the image's canonical version to make it appear funny or\n                  offensive.\n        \"\"\"\n        return self._spoof_likelihood\n\n    @property\n    def medical(self):\n        \"\"\"Likelihood this is a medical image.\n\n        :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`\n        :returns: The ``Likelihood`` that the image is medical in origin.\n        \"\"\"\n        return self._medical_likeliehood\n\n    @property\n    def violence(self):\n        \"\"\"Likeliehood that this image contains violence.\n\n        :rtype: :class:`~google.cloud.vision.likelihood.Likelihood`\n        :returns: The ``Likelihood`` that the image contains violence.\n        \"\"\"\n        return self._violence_likelihood\n", "path": "vision/google/cloud/vision/safe_search.py"}]}