We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Updated SubscriberClient docs
`subscribe_experimental` was promoted to `subscribe` but the docs for the `SubscriberClient` still suggested using `subscribe_experimental`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pubsub/google/cloud/pubsub_v1/subscriber/client.py`
Content:
```
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 
17 import pkg_resources
18 import os
19 
20 import grpc
21 
22 from google.api_core import grpc_helpers
23 
24 from google.cloud.pubsub_v1 import _gapic
25 from google.cloud.pubsub_v1 import types
26 from google.cloud.pubsub_v1.gapic import subscriber_client
27 from google.cloud.pubsub_v1.subscriber import futures
28 from google.cloud.pubsub_v1.subscriber._protocol import streaming_pull_manager
29 
30 
31 __version__ = pkg_resources.get_distribution('google-cloud-pubsub').version
32 
33 
34 @_gapic.add_methods(subscriber_client.SubscriberClient,
35                     blacklist=('pull', 'streaming_pull'))
36 class Client(object):
37     """A subscriber client for Google Cloud Pub/Sub.
38 
39     This creates an object that is capable of subscribing to messages.
40     Generally, you can instantiate this client with no arguments, and you
41     get sensible defaults.
42 
43     Args:
44         kwargs (dict): Any additional arguments provided are sent as keyword
45             keyword arguments to the underlying
46             :class:`~.gapic.pubsub.v1.subscriber_client.SubscriberClient`.
47             Generally, you should not need to set additional keyword
48             arguments.
49     """
50     def __init__(self, **kwargs):
51         # Sanity check: Is our goal to use the emulator?
52         # If so, create a grpc insecure channel with the emulator host
53         # as the target.
54         if os.environ.get('PUBSUB_EMULATOR_HOST'):
55             kwargs['channel'] = grpc.insecure_channel(
56                 target=os.environ.get('PUBSUB_EMULATOR_HOST'),
57             )
58 
59         # Use a custom channel.
60         # We need this in order to set appropriate default message size and
61         # keepalive options.
62         if 'channel' not in kwargs:
63             kwargs['channel'] = grpc_helpers.create_channel(
64                 credentials=kwargs.pop('credentials', None),
65                 target=self.target,
66                 scopes=subscriber_client.SubscriberClient._DEFAULT_SCOPES,
67                 options={
68                     'grpc.max_send_message_length': -1,
69                     'grpc.max_receive_message_length': -1,
70                     'grpc.keepalive_time_ms': 30000,
71                 }.items(),
72             )
73 
74         # Add the metrics headers, and instantiate the underlying GAPIC
75         # client.
76         self._api = subscriber_client.SubscriberClient(**kwargs)
77 
78     @property
79     def target(self):
80         """Return the target (where the API is).
81 
82         Returns:
83             str: The location of the API.
84         """
85         return subscriber_client.SubscriberClient.SERVICE_ADDRESS
86 
87     @property
88     def api(self):
89         """The underlying gapic API client."""
90         return self._api
91 
92     def subscribe(
93             self, subscription, callback, flow_control=(),
94             scheduler=None):
95         """Asynchronously start receiving messages on a given subscription.
96 
97         This method starts a background thread to begin pulling messages from
98         a Pub/Sub subscription and scheduling them to be processed using the
99         provided ``callback``.
100 
101         The ``callback`` will be called with an individual
102         :class:`google.cloud.pubsub_v1.subscriber.message.Message`. It is the
103         responsibility of the callback to either call ``ack()`` or ``nack()``
104         on the message when it finished processing. If an exception occurs in
105         the callback during processing, the exception is logged and the message
106         is ``nack()`` ed.
107 
108         The ``flow_control`` argument can be used to control the rate of at
109         which messages are pulled. The settings are relatively conservative by
110         default to prevent "message hoarding" - a situation where the client
111         pulls a large number of messages but can not process them fast enough
112         leading it to "starve" other clients of messages. Increasing these
113         settings may lead to faster throughput for messages that do not take
114         a long time to process.
115 
116         This method starts the receiver in the background and returns a
117         *Future* representing its execution. Waiting on the future (calling
118         ``result()``) will block forever or until a non-recoverable error
119         is encountered (such as loss of network connectivity). Cancelling the
120         future will signal the process to shutdown gracefully and exit.
121 
122         Example
123 
124         .. code-block:: python
125 
126             from google.cloud.pubsub_v1 import subscriber
127 
128             subscriber_client = pubsub.SubscriberClient()
129 
130             # existing subscription
131             subscription = subscriber_client.subscription_path(
132                 'my-project-id', 'my-subscription')
133 
134             def callback(message):
135                 print(message)
136                 message.ack()
137 
138             future = subscriber.subscribe_experimental(
139                 subscription, callback)
140 
141             try:
142                 future.result()
143             except KeyboardInterrupt:
144                 future.cancel()
145 
146         Args:
147             subscription (str): The name of the subscription. The
148                 subscription should have already been created (for example,
149                 by using :meth:`create_subscription`).
150             callback (Callable[~.pubsub_v1.subscriber.message.Message]):
151                 The callback function. This function receives the message as
152                 its only argument and will be called from a different thread/
153                 process depending on the scheduling strategy.
154             flow_control (~.pubsub_v1.types.FlowControl): The flow control
155                 settings. Use this to prevent situations where you are
156                 inundated with too many messages at once.
157             scheduler (~.pubsub_v1.subscriber.scheduler.Scheduler): An optional
158                 *scheduler* to use when executing the callback. This controls
159                 how callbacks are executed concurrently.
160 
161         Returns:
162             google.cloud.pubsub_v1.futures.StreamingPullFuture: A Future object
163                 that can be used to manage the background stream.
164         """
165         flow_control = types.FlowControl(*flow_control)
166 
167         manager = streaming_pull_manager.StreamingPullManager(
168             self, subscription, flow_control=flow_control, scheduler=scheduler)
169 
170         future = futures.StreamingPullFuture(manager)
171 
172         manager.open(callback)
173 
174         return future
175
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pubsub/google/cloud/pubsub_v1/subscriber/client.py b/pubsub/google/cloud/pubsub_v1/subscriber/client.py
--- a/pubsub/google/cloud/pubsub_v1/subscriber/client.py
+++ b/pubsub/google/cloud/pubsub_v1/subscriber/client.py
@@ -135,7 +135,7 @@
                 print(message)
                 message.ack()
 
-            future = subscriber.subscribe_experimental(
+            future = subscriber.subscribe(
                 subscription, callback)
 
             try:

{"golden_diff": "diff --git a/pubsub/google/cloud/pubsub_v1/subscriber/client.py b/pubsub/google/cloud/pubsub_v1/subscriber/client.py\n--- a/pubsub/google/cloud/pubsub_v1/subscriber/client.py\n+++ b/pubsub/google/cloud/pubsub_v1/subscriber/client.py\n@@ -135,7 +135,7 @@\n                 print(message)\n                 message.ack()\n \n-            future = subscriber.subscribe_experimental(\n+            future = subscriber.subscribe(\n                 subscription, callback)\n \n             try:\n", "issue": "Updated SubscriberClient docs\n`subscribe_experimental` was promoted to `subscribe` but the docs for the `SubscriberClient` still suggested using `subscribe_experimental`\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\n\nimport pkg_resources\nimport os\n\nimport grpc\n\nfrom google.api_core import grpc_helpers\n\nfrom google.cloud.pubsub_v1 import _gapic\nfrom google.cloud.pubsub_v1 import types\nfrom google.cloud.pubsub_v1.gapic import subscriber_client\nfrom google.cloud.pubsub_v1.subscriber import futures\nfrom google.cloud.pubsub_v1.subscriber._protocol import streaming_pull_manager\n\n\n__version__ = pkg_resources.get_distribution('google-cloud-pubsub').version\n\n\n@_gapic.add_methods(subscriber_client.SubscriberClient,\n                    blacklist=('pull', 'streaming_pull'))\nclass Client(object):\n    \"\"\"A subscriber client for Google Cloud Pub/Sub.\n\n    This creates an object that is capable of subscribing to messages.\n    Generally, you can instantiate this client with no arguments, and you\n    get sensible defaults.\n\n    Args:\n        kwargs (dict): Any additional arguments provided are sent as keyword\n            keyword arguments to the underlying\n            :class:`~.gapic.pubsub.v1.subscriber_client.SubscriberClient`.\n            Generally, you should not need to set additional keyword\n            arguments.\n    \"\"\"\n    def __init__(self, **kwargs):\n        # Sanity check: Is our goal to use the emulator?\n        # If so, create a grpc insecure channel with the emulator host\n        # as the target.\n        if os.environ.get('PUBSUB_EMULATOR_HOST'):\n            kwargs['channel'] = grpc.insecure_channel(\n                target=os.environ.get('PUBSUB_EMULATOR_HOST'),\n            )\n\n        # Use a custom channel.\n        # We need this in order to set appropriate default message size and\n        # keepalive options.\n        if 'channel' not in kwargs:\n            kwargs['channel'] = grpc_helpers.create_channel(\n                credentials=kwargs.pop('credentials', None),\n                target=self.target,\n                scopes=subscriber_client.SubscriberClient._DEFAULT_SCOPES,\n                options={\n                    'grpc.max_send_message_length': -1,\n                    'grpc.max_receive_message_length': -1,\n                    'grpc.keepalive_time_ms': 30000,\n                }.items(),\n            )\n\n        # Add the metrics headers, and instantiate the underlying GAPIC\n        # client.\n        self._api = subscriber_client.SubscriberClient(**kwargs)\n\n    @property\n    def target(self):\n        \"\"\"Return the target (where the API is).\n\n        Returns:\n            str: The location of the API.\n        \"\"\"\n        return subscriber_client.SubscriberClient.SERVICE_ADDRESS\n\n    @property\n    def api(self):\n        \"\"\"The underlying gapic API client.\"\"\"\n        return self._api\n\n    def subscribe(\n            self, subscription, callback, flow_control=(),\n            scheduler=None):\n        \"\"\"Asynchronously start receiving messages on a given subscription.\n\n        This method starts a background thread to begin pulling messages from\n        a Pub/Sub subscription and scheduling them to be processed using the\n        provided ``callback``.\n\n        The ``callback`` will be called with an individual\n        :class:`google.cloud.pubsub_v1.subscriber.message.Message`. It is the\n        responsibility of the callback to either call ``ack()`` or ``nack()``\n        on the message when it finished processing. If an exception occurs in\n        the callback during processing, the exception is logged and the message\n        is ``nack()`` ed.\n\n        The ``flow_control`` argument can be used to control the rate of at\n        which messages are pulled. The settings are relatively conservative by\n        default to prevent \"message hoarding\" - a situation where the client\n        pulls a large number of messages but can not process them fast enough\n        leading it to \"starve\" other clients of messages. Increasing these\n        settings may lead to faster throughput for messages that do not take\n        a long time to process.\n\n        This method starts the receiver in the background and returns a\n        *Future* representing its execution. Waiting on the future (calling\n        ``result()``) will block forever or until a non-recoverable error\n        is encountered (such as loss of network connectivity). Cancelling the\n        future will signal the process to shutdown gracefully and exit.\n\n        Example\n\n        .. code-block:: python\n\n            from google.cloud.pubsub_v1 import subscriber\n\n            subscriber_client = pubsub.SubscriberClient()\n\n            # existing subscription\n            subscription = subscriber_client.subscription_path(\n                'my-project-id', 'my-subscription')\n\n            def callback(message):\n                print(message)\n                message.ack()\n\n            future = subscriber.subscribe_experimental(\n                subscription, callback)\n\n            try:\n                future.result()\n            except KeyboardInterrupt:\n                future.cancel()\n\n        Args:\n            subscription (str): The name of the subscription. The\n                subscription should have already been created (for example,\n                by using :meth:`create_subscription`).\n            callback (Callable[~.pubsub_v1.subscriber.message.Message]):\n                The callback function. This function receives the message as\n                its only argument and will be called from a different thread/\n                process depending on the scheduling strategy.\n            flow_control (~.pubsub_v1.types.FlowControl): The flow control\n                settings. Use this to prevent situations where you are\n                inundated with too many messages at once.\n            scheduler (~.pubsub_v1.subscriber.scheduler.Scheduler): An optional\n                *scheduler* to use when executing the callback. This controls\n                how callbacks are executed concurrently.\n\n        Returns:\n            google.cloud.pubsub_v1.futures.StreamingPullFuture: A Future object\n                that can be used to manage the background stream.\n        \"\"\"\n        flow_control = types.FlowControl(*flow_control)\n\n        manager = streaming_pull_manager.StreamingPullManager(\n            self, subscription, flow_control=flow_control, scheduler=scheduler)\n\n        future = futures.StreamingPullFuture(manager)\n\n        manager.open(callback)\n\n        return future\n", "path": "pubsub/google/cloud/pubsub_v1/subscriber/client.py"}], "after_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\n\nimport pkg_resources\nimport os\n\nimport grpc\n\nfrom google.api_core import grpc_helpers\n\nfrom google.cloud.pubsub_v1 import _gapic\nfrom google.cloud.pubsub_v1 import types\nfrom google.cloud.pubsub_v1.gapic import subscriber_client\nfrom google.cloud.pubsub_v1.subscriber import futures\nfrom google.cloud.pubsub_v1.subscriber._protocol import streaming_pull_manager\n\n\n__version__ = pkg_resources.get_distribution('google-cloud-pubsub').version\n\n\n@_gapic.add_methods(subscriber_client.SubscriberClient,\n                    blacklist=('pull', 'streaming_pull'))\nclass Client(object):\n    \"\"\"A subscriber client for Google Cloud Pub/Sub.\n\n    This creates an object that is capable of subscribing to messages.\n    Generally, you can instantiate this client with no arguments, and you\n    get sensible defaults.\n\n    Args:\n        kwargs (dict): Any additional arguments provided are sent as keyword\n            keyword arguments to the underlying\n            :class:`~.gapic.pubsub.v1.subscriber_client.SubscriberClient`.\n            Generally, you should not need to set additional keyword\n            arguments.\n    \"\"\"\n    def __init__(self, **kwargs):\n        # Sanity check: Is our goal to use the emulator?\n        # If so, create a grpc insecure channel with the emulator host\n        # as the target.\n        if os.environ.get('PUBSUB_EMULATOR_HOST'):\n            kwargs['channel'] = grpc.insecure_channel(\n                target=os.environ.get('PUBSUB_EMULATOR_HOST'),\n            )\n\n        # Use a custom channel.\n        # We need this in order to set appropriate default message size and\n        # keepalive options.\n        if 'channel' not in kwargs:\n            kwargs['channel'] = grpc_helpers.create_channel(\n                credentials=kwargs.pop('credentials', None),\n                target=self.target,\n                scopes=subscriber_client.SubscriberClient._DEFAULT_SCOPES,\n                options={\n                    'grpc.max_send_message_length': -1,\n                    'grpc.max_receive_message_length': -1,\n                    'grpc.keepalive_time_ms': 30000,\n                }.items(),\n            )\n\n        # Add the metrics headers, and instantiate the underlying GAPIC\n        # client.\n        self._api = subscriber_client.SubscriberClient(**kwargs)\n\n    @property\n    def target(self):\n        \"\"\"Return the target (where the API is).\n\n        Returns:\n            str: The location of the API.\n        \"\"\"\n        return subscriber_client.SubscriberClient.SERVICE_ADDRESS\n\n    @property\n    def api(self):\n        \"\"\"The underlying gapic API client.\"\"\"\n        return self._api\n\n    def subscribe(\n            self, subscription, callback, flow_control=(),\n            scheduler=None):\n        \"\"\"Asynchronously start receiving messages on a given subscription.\n\n        This method starts a background thread to begin pulling messages from\n        a Pub/Sub subscription and scheduling them to be processed using the\n        provided ``callback``.\n\n        The ``callback`` will be called with an individual\n        :class:`google.cloud.pubsub_v1.subscriber.message.Message`. It is the\n        responsibility of the callback to either call ``ack()`` or ``nack()``\n        on the message when it finished processing. If an exception occurs in\n        the callback during processing, the exception is logged and the message\n        is ``nack()`` ed.\n\n        The ``flow_control`` argument can be used to control the rate of at\n        which messages are pulled. The settings are relatively conservative by\n        default to prevent \"message hoarding\" - a situation where the client\n        pulls a large number of messages but can not process them fast enough\n        leading it to \"starve\" other clients of messages. Increasing these\n        settings may lead to faster throughput for messages that do not take\n        a long time to process.\n\n        This method starts the receiver in the background and returns a\n        *Future* representing its execution. Waiting on the future (calling\n        ``result()``) will block forever or until a non-recoverable error\n        is encountered (such as loss of network connectivity). Cancelling the\n        future will signal the process to shutdown gracefully and exit.\n\n        Example\n\n        .. code-block:: python\n\n            from google.cloud.pubsub_v1 import subscriber\n\n            subscriber_client = pubsub.SubscriberClient()\n\n            # existing subscription\n            subscription = subscriber_client.subscription_path(\n                'my-project-id', 'my-subscription')\n\n            def callback(message):\n                print(message)\n                message.ack()\n\n            future = subscriber.subscribe(\n                subscription, callback)\n\n            try:\n                future.result()\n            except KeyboardInterrupt:\n                future.cancel()\n\n        Args:\n            subscription (str): The name of the subscription. The\n                subscription should have already been created (for example,\n                by using :meth:`create_subscription`).\n            callback (Callable[~.pubsub_v1.subscriber.message.Message]):\n                The callback function. This function receives the message as\n                its only argument and will be called from a different thread/\n                process depending on the scheduling strategy.\n            flow_control (~.pubsub_v1.types.FlowControl): The flow control\n                settings. Use this to prevent situations where you are\n                inundated with too many messages at once.\n            scheduler (~.pubsub_v1.subscriber.scheduler.Scheduler): An optional\n                *scheduler* to use when executing the callback. This controls\n                how callbacks are executed concurrently.\n\n        Returns:\n            google.cloud.pubsub_v1.futures.StreamingPullFuture: A Future object\n                that can be used to manage the background stream.\n        \"\"\"\n        flow_control = types.FlowControl(*flow_control)\n\n        manager = streaming_pull_manager.StreamingPullManager(\n            self, subscription, flow_control=flow_control, scheduler=scheduler)\n\n        future = futures.StreamingPullFuture(manager)\n\n        manager.open(callback)\n\n        return future\n", "path": "pubsub/google/cloud/pubsub_v1/subscriber/client.py"}]}