prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  BigQuery: Document the use of the timeout parameter in samples
  After adding the new `timeout` parameter to various public methods (#9987), we should demonstrate its usage in the code samples.
  
  Users should be aware of this new feature, and should probably use it by default to avoid sporadic weird issues related to a method "getting stuck" at the transport layer.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `samples/create_dataset.py`
  Content:
  ```
  1 # Copyright 2019 Google 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 #     https://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 
  16 def create_dataset(dataset_id):
  17 
  18     # [START bigquery_create_dataset]
  19     from google.cloud import bigquery
  20 
  21     # Construct a BigQuery client object.
  22     client = bigquery.Client()
  23 
  24     # TODO(developer): Set dataset_id to the ID of the dataset to create.
  25     # dataset_id = "{}.your_dataset".format(client.project)
  26 
  27     # Construct a full Dataset object to send to the API.
  28     dataset = bigquery.Dataset(dataset_id)
  29 
  30     # TODO(developer): Specify the geographic location where the dataset should reside.
  31     dataset.location = "US"
  32 
  33     # Send the dataset to the API for creation.
  34     # Raises google.api_core.exceptions.Conflict if the Dataset already
  35     # exists within the project.
  36     dataset = client.create_dataset(dataset)  # Make an API request.
  37     print("Created dataset {}.{}".format(client.project, dataset.dataset_id))
  38     # [END bigquery_create_dataset]
  39
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/samples/create_dataset.py b/samples/create_dataset.py
  --- a/samples/create_dataset.py
  +++ b/samples/create_dataset.py
  @@ -30,9 +30,9 @@
       # TODO(developer): Specify the geographic location where the dataset should reside.
       dataset.location = "US"
   
  -    # Send the dataset to the API for creation.
  +    # Send the dataset to the API for creation, with an explicit timeout.
       # Raises google.api_core.exceptions.Conflict if the Dataset already
       # exists within the project.
  -    dataset = client.create_dataset(dataset)  # Make an API request.
  +    dataset = client.create_dataset(dataset, timeout=30)  # Make an API request.
       print("Created dataset {}.{}".format(client.project, dataset.dataset_id))
       # [END bigquery_create_dataset]
  
verification_info: {"golden_diff": "diff --git a/samples/create_dataset.py b/samples/create_dataset.py\n--- a/samples/create_dataset.py\n+++ b/samples/create_dataset.py\n@@ -30,9 +30,9 @@\n     # TODO(developer): Specify the geographic location where the dataset should reside.\n     dataset.location = \"US\"\n \n-    # Send the dataset to the API for creation.\n+    # Send the dataset to the API for creation, with an explicit timeout.\n     # Raises google.api_core.exceptions.Conflict if the Dataset already\n     # exists within the project.\n-    dataset = client.create_dataset(dataset)  # Make an API request.\n+    dataset = client.create_dataset(dataset, timeout=30)  # Make an API request.\n     print(\"Created dataset {}.{}\".format(client.project, dataset.dataset_id))\n     # [END bigquery_create_dataset]\n", "issue": "BigQuery: Document the use of the timeout parameter in samples\nAfter adding the new `timeout` parameter to various public methods (#9987), we should demonstrate its usage in the code samples.\r\n\r\nUsers should be aware of this new feature, and should probably use it by default to avoid sporadic weird issues related to a method \"getting stuck\" at the transport layer.\n", "before_files": [{"content": "# Copyright 2019 Google 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#     https://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\ndef create_dataset(dataset_id):\n\n    # [START bigquery_create_dataset]\n    from google.cloud import bigquery\n\n    # Construct a BigQuery client object.\n    client = bigquery.Client()\n\n    # TODO(developer): Set dataset_id to the ID of the dataset to create.\n    # dataset_id = \"{}.your_dataset\".format(client.project)\n\n    # Construct a full Dataset object to send to the API.\n    dataset = bigquery.Dataset(dataset_id)\n\n    # TODO(developer): Specify the geographic location where the dataset should reside.\n    dataset.location = \"US\"\n\n    # Send the dataset to the API for creation.\n    # Raises google.api_core.exceptions.Conflict if the Dataset already\n    # exists within the project.\n    dataset = client.create_dataset(dataset)  # Make an API request.\n    print(\"Created dataset {}.{}\".format(client.project, dataset.dataset_id))\n    # [END bigquery_create_dataset]\n", "path": "samples/create_dataset.py"}], "after_files": [{"content": "# Copyright 2019 Google 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#     https://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\ndef create_dataset(dataset_id):\n\n    # [START bigquery_create_dataset]\n    from google.cloud import bigquery\n\n    # Construct a BigQuery client object.\n    client = bigquery.Client()\n\n    # TODO(developer): Set dataset_id to the ID of the dataset to create.\n    # dataset_id = \"{}.your_dataset\".format(client.project)\n\n    # Construct a full Dataset object to send to the API.\n    dataset = bigquery.Dataset(dataset_id)\n\n    # TODO(developer): Specify the geographic location where the dataset should reside.\n    dataset.location = \"US\"\n\n    # Send the dataset to the API for creation, with an explicit timeout.\n    # Raises google.api_core.exceptions.Conflict if the Dataset already\n    # exists within the project.\n    dataset = client.create_dataset(dataset, timeout=30)  # Make an API request.\n    print(\"Created dataset {}.{}\".format(client.project, dataset.dataset_id))\n    # [END bigquery_create_dataset]\n", "path": "samples/create_dataset.py"}]}