prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Default max_bytes in pubsub seems wrong
  https://github.com/GoogleCloudPlatform/google-cloud-python/blob/005ddd11770f8953643dac9b64a037524da2f49e/pubsub/google/cloud/pubsub_v1/types.py#L43
  
  In my code I'm seeing this:
  ```
  google.api_core.exceptions.InvalidArgument: 400 The value for 10159812 is too large. You passed request_size in the request, but the maximum value is 10000000.
  ```
  
  Based on the error coming out of the pubsub, I think this default max size is wrong.
  
  </issue>
  <code>
  [start of pubsub/google/cloud/pubsub_v1/types.py]
  1 # Copyright 2017, Google LLC All rights reserved.
  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 from __future__ import absolute_import
  16 import collections
  17 import sys
  18 
  19 from google.api import http_pb2
  20 from google.iam.v1 import iam_policy_pb2
  21 from google.iam.v1 import policy_pb2
  22 from google.iam.v1.logging import audit_data_pb2
  23 from google.protobuf import descriptor_pb2
  24 from google.protobuf import duration_pb2
  25 from google.protobuf import empty_pb2
  26 from google.protobuf import field_mask_pb2
  27 from google.protobuf import timestamp_pb2
  28 
  29 from google.api_core.protobuf_helpers import get_messages
  30 from google.cloud.pubsub_v1.proto import pubsub_pb2
  31 
  32 
  33 # Define the default values for batching.
  34 #
  35 # This class is used when creating a publisher or subscriber client, and
  36 # these settings can be altered to tweak Pub/Sub behavior.
  37 # The defaults should be fine for most use cases.
  38 BatchSettings = collections.namedtuple(
  39     'BatchSettings',
  40     ['max_bytes', 'max_latency', 'max_messages'],
  41 )
  42 BatchSettings.__new__.__defaults__ = (
  43     1024 * 1024 * 10,  # max_bytes: 10 MB
  44     0.05,              # max_latency: 0.05 seconds
  45     1000,              # max_messages: 1,000
  46 )
  47 
  48 # Define the type class and default values for flow control settings.
  49 #
  50 # This class is used when creating a publisher or subscriber client, and
  51 # these settings can be altered to tweak Pub/Sub behavior.
  52 # The defaults should be fine for most use cases.
  53 FlowControl = collections.namedtuple(
  54     'FlowControl',
  55     ['max_bytes', 'max_messages', 'resume_threshold', 'max_requests',
  56      'max_request_batch_size', 'max_request_batch_latency',
  57      'max_lease_duration'],
  58 )
  59 FlowControl.__new__.__defaults__ = (
  60     100 * 1024 * 1024,    # max_bytes: 100mb
  61     100,                  # max_messages: 100
  62     0.8,                  # resume_threshold: 80%
  63     100,                  # max_requests: 100
  64     100,                  # max_request_batch_size: 100
  65     0.01,                 # max_request_batch_latency: 0.01s
  66     2 * 60 * 60,          # max_lease_duration: 2 hours.
  67 )
  68 
  69 
  70 _shared_modules = [
  71     http_pb2,
  72     iam_policy_pb2,
  73     policy_pb2,
  74     audit_data_pb2,
  75     descriptor_pb2,
  76     duration_pb2,
  77     empty_pb2,
  78     field_mask_pb2,
  79     timestamp_pb2,
  80 ]
  81 
  82 _local_modules = [
  83     pubsub_pb2,
  84 ]
  85 
  86 
  87 names = ['BatchSettings', 'FlowControl']
  88 
  89 
  90 for module in _shared_modules:
  91     for name, message in get_messages(module).items():
  92         setattr(sys.modules[__name__], name, message)
  93         names.append(name)
  94 
  95 for module in _local_modules:
  96     for name, message in get_messages(module).items():
  97         message.__module__ = 'google.cloud.pubsub_v1.types'
  98         setattr(sys.modules[__name__], name, message)
  99         names.append(name)
  100 
  101 
  102 __all__ = tuple(sorted(names))
  103
  [end of pubsub/google/cloud/pubsub_v1/types.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/pubsub/google/cloud/pubsub_v1/types.py b/pubsub/google/cloud/pubsub_v1/types.py
  --- a/pubsub/google/cloud/pubsub_v1/types.py
  +++ b/pubsub/google/cloud/pubsub_v1/types.py
  @@ -40,7 +40,7 @@
       ['max_bytes', 'max_latency', 'max_messages'],
   )
   BatchSettings.__new__.__defaults__ = (
  -    1024 * 1024 * 10,  # max_bytes: 10 MB
  +    1000 * 1000 * 10,  # max_bytes: documented "10 MB", enforced 10000000
       0.05,              # max_latency: 0.05 seconds
       1000,              # max_messages: 1,000
   )
  
verification_info: {"golden_diff": "diff --git a/pubsub/google/cloud/pubsub_v1/types.py b/pubsub/google/cloud/pubsub_v1/types.py\n--- a/pubsub/google/cloud/pubsub_v1/types.py\n+++ b/pubsub/google/cloud/pubsub_v1/types.py\n@@ -40,7 +40,7 @@\n     ['max_bytes', 'max_latency', 'max_messages'],\n )\n BatchSettings.__new__.__defaults__ = (\n-    1024 * 1024 * 10,  # max_bytes: 10 MB\n+    1000 * 1000 * 10,  # max_bytes: documented \"10 MB\", enforced 10000000\n     0.05,              # max_latency: 0.05 seconds\n     1000,              # max_messages: 1,000\n )\n", "issue": "Default max_bytes in pubsub seems wrong\nhttps://github.com/GoogleCloudPlatform/google-cloud-python/blob/005ddd11770f8953643dac9b64a037524da2f49e/pubsub/google/cloud/pubsub_v1/types.py#L43\r\n\r\nIn my code I'm seeing this:\r\n```\r\ngoogle.api_core.exceptions.InvalidArgument: 400 The value for 10159812 is too large. You passed request_size in the request, but the maximum value is 10000000.\r\n```\r\n\r\nBased on the error coming out of the pubsub, I think this default max size is wrong.\n", "before_files": [{"content": "# Copyright 2017, Google LLC All rights reserved.\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\nfrom __future__ import absolute_import\nimport collections\nimport sys\n\nfrom google.api import http_pb2\nfrom google.iam.v1 import iam_policy_pb2\nfrom google.iam.v1 import policy_pb2\nfrom google.iam.v1.logging import audit_data_pb2\nfrom google.protobuf import descriptor_pb2\nfrom google.protobuf import duration_pb2\nfrom google.protobuf import empty_pb2\nfrom google.protobuf import field_mask_pb2\nfrom google.protobuf import timestamp_pb2\n\nfrom google.api_core.protobuf_helpers import get_messages\nfrom google.cloud.pubsub_v1.proto import pubsub_pb2\n\n\n# Define the default values for batching.\n#\n# This class is used when creating a publisher or subscriber client, and\n# these settings can be altered to tweak Pub/Sub behavior.\n# The defaults should be fine for most use cases.\nBatchSettings = collections.namedtuple(\n    'BatchSettings',\n    ['max_bytes', 'max_latency', 'max_messages'],\n)\nBatchSettings.__new__.__defaults__ = (\n    1024 * 1024 * 10,  # max_bytes: 10 MB\n    0.05,              # max_latency: 0.05 seconds\n    1000,              # max_messages: 1,000\n)\n\n# Define the type class and default values for flow control settings.\n#\n# This class is used when creating a publisher or subscriber client, and\n# these settings can be altered to tweak Pub/Sub behavior.\n# The defaults should be fine for most use cases.\nFlowControl = collections.namedtuple(\n    'FlowControl',\n    ['max_bytes', 'max_messages', 'resume_threshold', 'max_requests',\n     'max_request_batch_size', 'max_request_batch_latency',\n     'max_lease_duration'],\n)\nFlowControl.__new__.__defaults__ = (\n    100 * 1024 * 1024,    # max_bytes: 100mb\n    100,                  # max_messages: 100\n    0.8,                  # resume_threshold: 80%\n    100,                  # max_requests: 100\n    100,                  # max_request_batch_size: 100\n    0.01,                 # max_request_batch_latency: 0.01s\n    2 * 60 * 60,          # max_lease_duration: 2 hours.\n)\n\n\n_shared_modules = [\n    http_pb2,\n    iam_policy_pb2,\n    policy_pb2,\n    audit_data_pb2,\n    descriptor_pb2,\n    duration_pb2,\n    empty_pb2,\n    field_mask_pb2,\n    timestamp_pb2,\n]\n\n_local_modules = [\n    pubsub_pb2,\n]\n\n\nnames = ['BatchSettings', 'FlowControl']\n\n\nfor module in _shared_modules:\n    for name, message in get_messages(module).items():\n        setattr(sys.modules[__name__], name, message)\n        names.append(name)\n\nfor module in _local_modules:\n    for name, message in get_messages(module).items():\n        message.__module__ = 'google.cloud.pubsub_v1.types'\n        setattr(sys.modules[__name__], name, message)\n        names.append(name)\n\n\n__all__ = tuple(sorted(names))\n", "path": "pubsub/google/cloud/pubsub_v1/types.py"}]}