prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  docker.utils.decorators.check_resource problem
  When use `docker_client.start(**kwargs)` to start the container, will be raise follow exception:
  
  ```
  c.start(**s_kwargs)
    File "/home/simplecloud/shiyanlou/env/local/lib/python2.7/site-packages/docker/utils/decorators.py", line 12, in wrapped
      return f(self, resource_id, *args, **kwargs)
  TypeError: start() got multiple values for keyword argument 'container'
  ```
  
  
  </issue>
  <code>
  [start of docker/utils/decorators.py]
  1 from .. import errors
  2 
  3 
  4 def check_resource(f):
  5     def wrapped(self, resource_id=None, *args, **kwargs):
  6         if resource_id is None and (
  7             kwargs.get('container') is None and kwargs.get('image') is None
  8         ):
  9             raise errors.NullResource(
  10                 'image or container param is None'
  11             )
  12         return f(self, resource_id, *args, **kwargs)
  13     return wrapped
  14
  [end of docker/utils/decorators.py]
  [start of docker/version.py]
  1 version = "1.2.1-dev"
  2 version_info = tuple([int(d) for d in version.replace("-dev", "").split(".")])
  3
  [end of docker/version.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/docker/utils/decorators.py b/docker/utils/decorators.py
  --- a/docker/utils/decorators.py
  +++ b/docker/utils/decorators.py
  @@ -3,11 +3,14 @@
   
   def check_resource(f):
       def wrapped(self, resource_id=None, *args, **kwargs):
  -        if resource_id is None and (
  -            kwargs.get('container') is None and kwargs.get('image') is None
  -        ):
  -            raise errors.NullResource(
  -                'image or container param is None'
  -            )
  +        if resource_id is None:
  +            if kwargs.get('container'):
  +                resource_id = kwargs.pop('container')
  +            elif kwargs.get('image'):
  +                resource_id = kwargs.pop('image')
  +            else:
  +                raise errors.NullResource(
  +                    'image or container param is undefined'
  +                )
           return f(self, resource_id, *args, **kwargs)
       return wrapped
  diff --git a/docker/version.py b/docker/version.py
  --- a/docker/version.py
  +++ b/docker/version.py
  @@ -1,2 +1,2 @@
  -version = "1.2.1-dev"
  +version = "1.2.1"
   version_info = tuple([int(d) for d in version.replace("-dev", "").split(".")])
  
verification_info: {"golden_diff": "diff --git a/docker/utils/decorators.py b/docker/utils/decorators.py\n--- a/docker/utils/decorators.py\n+++ b/docker/utils/decorators.py\n@@ -3,11 +3,14 @@\n \n def check_resource(f):\n     def wrapped(self, resource_id=None, *args, **kwargs):\n-        if resource_id is None and (\n-            kwargs.get('container') is None and kwargs.get('image') is None\n-        ):\n-            raise errors.NullResource(\n-                'image or container param is None'\n-            )\n+        if resource_id is None:\n+            if kwargs.get('container'):\n+                resource_id = kwargs.pop('container')\n+            elif kwargs.get('image'):\n+                resource_id = kwargs.pop('image')\n+            else:\n+                raise errors.NullResource(\n+                    'image or container param is undefined'\n+                )\n         return f(self, resource_id, *args, **kwargs)\n     return wrapped\ndiff --git a/docker/version.py b/docker/version.py\n--- a/docker/version.py\n+++ b/docker/version.py\n@@ -1,2 +1,2 @@\n-version = \"1.2.1-dev\"\n+version = \"1.2.1\"\n version_info = tuple([int(d) for d in version.replace(\"-dev\", \"\").split(\".\")])\n", "issue": "docker.utils.decorators.check_resource problem\nWhen use `docker_client.start(**kwargs)` to start the container, will be raise follow exception:\n\n```\nc.start(**s_kwargs)\n  File \"/home/simplecloud/shiyanlou/env/local/lib/python2.7/site-packages/docker/utils/decorators.py\", line 12, in wrapped\n    return f(self, resource_id, *args, **kwargs)\nTypeError: start() got multiple values for keyword argument 'container'\n```\n\n", "before_files": [{"content": "from .. import errors\n\n\ndef check_resource(f):\n    def wrapped(self, resource_id=None, *args, **kwargs):\n        if resource_id is None and (\n            kwargs.get('container') is None and kwargs.get('image') is None\n        ):\n            raise errors.NullResource(\n                'image or container param is None'\n            )\n        return f(self, resource_id, *args, **kwargs)\n    return wrapped\n", "path": "docker/utils/decorators.py"}, {"content": "version = \"1.2.1-dev\"\nversion_info = tuple([int(d) for d in version.replace(\"-dev\", \"\").split(\".\")])\n", "path": "docker/version.py"}]}