prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  policies where Resource=user-pool results in error=Missing required parameter in input: "MaxResults" 
  A user-pool based resource policy results in an error for missing required parameter=MaxResults
  ```
  policies:
    - name: RequiredTagsAbsentCognitoUserPool
      resource: user-pool
      description: |
        Notify if Required tags Absent
      filters:
        - "tag:OwnerEmail": absent
  ```
  2017-08-03 22:49:43,321: custodian.output:ERROR Error while executing policy
  Traceback (most recent call last):
    File "/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/c7n/policy.py", line 306, in run
      resources = self.policy.resource_manager.resources()
    File "/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/c7n/query.py", line 292, in resources
      resources = self.augment(self.source.resources(query))
    File "/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/c7n/query.py", line 154, in resources
      resources = self.query.filter(self.manager.resource_type, **query)
    File "/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/c7n/query.py", line 67, in filter
      data = op(**params)
    File "/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/botocore/client.py", line 310, in _api_call
      return self._make_api_call(operation_name, kwargs)
    File "/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/botocore/client.py", line 573, in _make_api_call
      api_params, operation_model, context=request_context)
    File "/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/botocore/client.py", line 628, in _convert_to_request_dict
      api_params, operation_model)
    File "/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/botocore/validate.py", line 291, in serialize_to_request
      raise ParamValidationError(report=report.generate_report())
  ParamValidationError: Parameter validation failed:
  Missing required parameter in input: "MaxResults"
  
  </issue>
  <code>
  [start of c7n/resources/cognito.py]
  1 # Copyright 2016 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 from __future__ import absolute_import, division, print_function, unicode_literals
  15 
  16 from c7n.manager import resources
  17 from c7n.query import QueryResourceManager
  18 
  19 
  20 @resources.register('identity-pool')
  21 class CognitoIdentityPool(QueryResourceManager):
  22 
  23     class resource_type(object):
  24         service = 'cognito-identity'
  25         enum_spec = ('list_identity_pools', 'IdentityPools', None)
  26         detail_spec = (
  27             'describe_identity_pool', 'IdentityPoolId', 'IdentityPoolId')
  28         id = 'IdentityPoolId'
  29         name = 'IdentityPoolName'
  30         filter_name = None
  31         dimension = None
  32 
  33 
  34 @resources.register('user-pool')
  35 class CognitoUserPool(QueryResourceManager):
  36 
  37     class resource_type(object):
  38         service = "cognito-idp"
  39         enum_spec = ('list_user_pools', 'UserPools', None)
  40         detail_spec = (
  41             'describe_user_pool', 'UserPoolId', 'Id', 'UserPool')
  42         id = 'Id'
  43         name = 'Name'
  44         filter_name = None
  45         dimension = None
  46
  [end of c7n/resources/cognito.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/c7n/resources/cognito.py b/c7n/resources/cognito.py
  --- a/c7n/resources/cognito.py
  +++ b/c7n/resources/cognito.py
  @@ -22,9 +22,9 @@
   
       class resource_type(object):
           service = 'cognito-identity'
  -        enum_spec = ('list_identity_pools', 'IdentityPools', None)
  +        enum_spec = ('list_identity_pools', 'IdentityPools', {'MaxResults': 60})
           detail_spec = (
  -            'describe_identity_pool', 'IdentityPoolId', 'IdentityPoolId')
  +            'describe_identity_pool', 'IdentityPoolId', 'IdentityPoolId', None)
           id = 'IdentityPoolId'
           name = 'IdentityPoolName'
           filter_name = None
  @@ -36,7 +36,7 @@
   
       class resource_type(object):
           service = "cognito-idp"
  -        enum_spec = ('list_user_pools', 'UserPools', None)
  +        enum_spec = ('list_user_pools', 'UserPools', {'MaxResults': 60})
           detail_spec = (
               'describe_user_pool', 'UserPoolId', 'Id', 'UserPool')
           id = 'Id'
  
verification_info: {"golden_diff": "diff --git a/c7n/resources/cognito.py b/c7n/resources/cognito.py\n--- a/c7n/resources/cognito.py\n+++ b/c7n/resources/cognito.py\n@@ -22,9 +22,9 @@\n \n     class resource_type(object):\n         service = 'cognito-identity'\n-        enum_spec = ('list_identity_pools', 'IdentityPools', None)\n+        enum_spec = ('list_identity_pools', 'IdentityPools', {'MaxResults': 60})\n         detail_spec = (\n-            'describe_identity_pool', 'IdentityPoolId', 'IdentityPoolId')\n+            'describe_identity_pool', 'IdentityPoolId', 'IdentityPoolId', None)\n         id = 'IdentityPoolId'\n         name = 'IdentityPoolName'\n         filter_name = None\n@@ -36,7 +36,7 @@\n \n     class resource_type(object):\n         service = \"cognito-idp\"\n-        enum_spec = ('list_user_pools', 'UserPools', None)\n+        enum_spec = ('list_user_pools', 'UserPools', {'MaxResults': 60})\n         detail_spec = (\n             'describe_user_pool', 'UserPoolId', 'Id', 'UserPool')\n         id = 'Id'\n", "issue": "policies where Resource=user-pool results in error=Missing required parameter in input: \"MaxResults\" \nA user-pool based resource policy results in an error for missing required parameter=MaxResults\r\n```\r\npolicies:\r\n  - name: RequiredTagsAbsentCognitoUserPool\r\n    resource: user-pool\r\n    description: |\r\n      Notify if Required tags Absent\r\n    filters:\r\n      - \"tag:OwnerEmail\": absent\r\n```\r\n2017-08-03 22:49:43,321: custodian.output:ERROR Error while executing policy\r\nTraceback (most recent call last):\r\n  File \"/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/c7n/policy.py\", line 306, in run\r\n    resources = self.policy.resource_manager.resources()\r\n  File \"/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/c7n/query.py\", line 292, in resources\r\n    resources = self.augment(self.source.resources(query))\r\n  File \"/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/c7n/query.py\", line 154, in resources\r\n    resources = self.query.filter(self.manager.resource_type, **query)\r\n  File \"/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/c7n/query.py\", line 67, in filter\r\n    data = op(**params)\r\n  File \"/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/botocore/client.py\", line 310, in _api_call\r\n    return self._make_api_call(operation_name, kwargs)\r\n  File \"/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/botocore/client.py\", line 573, in _make_api_call\r\n    api_params, operation_model, context=request_context)\r\n  File \"/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/botocore/client.py\", line 628, in _convert_to_request_dict\r\n    api_params, operation_model)\r\n  File \"/mnt/home2/opensrc/cloud-custodian-public-release/.tox/py27/local/lib/python2.7/site-packages/botocore/validate.py\", line 291, in serialize_to_request\r\n    raise ParamValidationError(report=report.generate_report())\r\nParamValidationError: Parameter validation failed:\r\nMissing required parameter in input: \"MaxResults\"\n", "before_files": [{"content": "# Copyright 2016 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.\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom c7n.manager import resources\nfrom c7n.query import QueryResourceManager\n\n\n@resources.register('identity-pool')\nclass CognitoIdentityPool(QueryResourceManager):\n\n    class resource_type(object):\n        service = 'cognito-identity'\n        enum_spec = ('list_identity_pools', 'IdentityPools', None)\n        detail_spec = (\n            'describe_identity_pool', 'IdentityPoolId', 'IdentityPoolId')\n        id = 'IdentityPoolId'\n        name = 'IdentityPoolName'\n        filter_name = None\n        dimension = None\n\n\n@resources.register('user-pool')\nclass CognitoUserPool(QueryResourceManager):\n\n    class resource_type(object):\n        service = \"cognito-idp\"\n        enum_spec = ('list_user_pools', 'UserPools', None)\n        detail_spec = (\n            'describe_user_pool', 'UserPoolId', 'Id', 'UserPool')\n        id = 'Id'\n        name = 'Name'\n        filter_name = None\n        dimension = None\n", "path": "c7n/resources/cognito.py"}]}