We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
chore: replace Artman with bazel for synthesizing code
The synthtool should start using bazel instead of Artman.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `synth.py`
Content:
```
1 # Copyright 2018 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 #     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 """This script is used to synthesize generated parts of this library."""
16 
17 import synthtool as s
18 from synthtool import gcp
19 
20 gapic = gcp.GAPICGenerator()
21 common = gcp.CommonTemplates()
22 version = 'v2'
23 
24 library = gapic.py_library(
25     'bigquery',
26     version,
27     config_path='/google/cloud/bigquery/'
28                 'artman_bigquery_v2.yaml',
29     artman_output_name='bigquery-v2',
30     include_protos=True,
31 )
32 
33 s.move(
34     [
35         library / "google/cloud/bigquery_v2/gapic/enums.py",
36         library / "google/cloud/bigquery_v2/types.py",
37         library / "google/cloud/bigquery_v2/proto/location*",
38         library / "google/cloud/bigquery_v2/proto/encryption_config*",
39         library / "google/cloud/bigquery_v2/proto/model*",
40         library / "google/cloud/bigquery_v2/proto/standard_sql*",
41     ],
42 )
43 
44 # Fix up proto docs that are missing summary line.
45 s.replace(
46     "google/cloud/bigquery_v2/proto/model_pb2.py",
47     '"""Attributes:',
48     '"""Protocol buffer.\n\n  Attributes:',
49 )
50 s.replace(
51     "google/cloud/bigquery_v2/proto/encryption_config_pb2.py",
52     '"""Attributes:',
53     '"""Encryption configuration.\n\n  Attributes:',
54 )
55 
56 # Remove non-ascii characters from docstrings for Python 2.7.
57 # Format quoted strings as plain text.
58 s.replace("google/cloud/bigquery_v2/proto/*.py", "[“”]", '``')
59 
60 # ----------------------------------------------------------------------------
61 # Add templated files
62 # ----------------------------------------------------------------------------
63 templated_files = common.py_library(cov_level=100)
64 s.move(templated_files, excludes=["noxfile.py"])
65 
66 s.shell.run(["nox", "-s", "blacken"], hide_output=False)
67
```
--- 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/synth.py b/synth.py
--- a/synth.py
+++ b/synth.py
@@ -17,16 +17,14 @@
 import synthtool as s
 from synthtool import gcp
 
-gapic = gcp.GAPICGenerator()
+gapic = gcp.GAPICBazel()
 common = gcp.CommonTemplates()
 version = 'v2'
 
 library = gapic.py_library(
-    'bigquery',
-    version,
-    config_path='/google/cloud/bigquery/'
-                'artman_bigquery_v2.yaml',
-    artman_output_name='bigquery-v2',
+    service='bigquery',
+    version=version,
+    bazel_target=f"//google/cloud/bigquery/{version}:bigquery-{version}-py",
     include_protos=True,
 )

{"golden_diff": "diff --git a/synth.py b/synth.py\n--- a/synth.py\n+++ b/synth.py\n@@ -17,16 +17,14 @@\n import synthtool as s\n from synthtool import gcp\n \n-gapic = gcp.GAPICGenerator()\n+gapic = gcp.GAPICBazel()\n common = gcp.CommonTemplates()\n version = 'v2'\n \n library = gapic.py_library(\n-    'bigquery',\n-    version,\n-    config_path='/google/cloud/bigquery/'\n-                'artman_bigquery_v2.yaml',\n-    artman_output_name='bigquery-v2',\n+    service='bigquery',\n+    version=version,\n+    bazel_target=f\"//google/cloud/bigquery/{version}:bigquery-{version}-py\",\n     include_protos=True,\n )\n", "issue": "chore: replace Artman with bazel for synthesizing code\nThe synthtool should start using bazel instead of Artman.\n", "before_files": [{"content": "# Copyright 2018 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#     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\n\"\"\"This script is used to synthesize generated parts of this library.\"\"\"\n\nimport synthtool as s\nfrom synthtool import gcp\n\ngapic = gcp.GAPICGenerator()\ncommon = gcp.CommonTemplates()\nversion = 'v2'\n\nlibrary = gapic.py_library(\n    'bigquery',\n    version,\n    config_path='/google/cloud/bigquery/'\n                'artman_bigquery_v2.yaml',\n    artman_output_name='bigquery-v2',\n    include_protos=True,\n)\n\ns.move(\n    [\n        library / \"google/cloud/bigquery_v2/gapic/enums.py\",\n        library / \"google/cloud/bigquery_v2/types.py\",\n        library / \"google/cloud/bigquery_v2/proto/location*\",\n        library / \"google/cloud/bigquery_v2/proto/encryption_config*\",\n        library / \"google/cloud/bigquery_v2/proto/model*\",\n        library / \"google/cloud/bigquery_v2/proto/standard_sql*\",\n    ],\n)\n\n# Fix up proto docs that are missing summary line.\ns.replace(\n    \"google/cloud/bigquery_v2/proto/model_pb2.py\",\n    '\"\"\"Attributes:',\n    '\"\"\"Protocol buffer.\\n\\n  Attributes:',\n)\ns.replace(\n    \"google/cloud/bigquery_v2/proto/encryption_config_pb2.py\",\n    '\"\"\"Attributes:',\n    '\"\"\"Encryption configuration.\\n\\n  Attributes:',\n)\n\n# Remove non-ascii characters from docstrings for Python 2.7.\n# Format quoted strings as plain text.\ns.replace(\"google/cloud/bigquery_v2/proto/*.py\", \"[\u201c\u201d]\", '``')\n\n# ----------------------------------------------------------------------------\n# Add templated files\n# ----------------------------------------------------------------------------\ntemplated_files = common.py_library(cov_level=100)\ns.move(templated_files, excludes=[\"noxfile.py\"])\n\ns.shell.run([\"nox\", \"-s\", \"blacken\"], hide_output=False)\n", "path": "synth.py"}], "after_files": [{"content": "# Copyright 2018 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#     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\n\"\"\"This script is used to synthesize generated parts of this library.\"\"\"\n\nimport synthtool as s\nfrom synthtool import gcp\n\ngapic = gcp.GAPICBazel()\ncommon = gcp.CommonTemplates()\nversion = 'v2'\n\nlibrary = gapic.py_library(\n    service='bigquery',\n    version=version,\n    bazel_target=f\"//google/cloud/bigquery/{version}:bigquery-{version}-py\",\n    include_protos=True,\n)\n\ns.move(\n    [\n        library / \"google/cloud/bigquery_v2/gapic/enums.py\",\n        library / \"google/cloud/bigquery_v2/types.py\",\n        library / \"google/cloud/bigquery_v2/proto/location*\",\n        library / \"google/cloud/bigquery_v2/proto/encryption_config*\",\n        library / \"google/cloud/bigquery_v2/proto/model*\",\n        library / \"google/cloud/bigquery_v2/proto/standard_sql*\",\n    ],\n)\n\n# Fix up proto docs that are missing summary line.\ns.replace(\n    \"google/cloud/bigquery_v2/proto/model_pb2.py\",\n    '\"\"\"Attributes:',\n    '\"\"\"Protocol buffer.\\n\\n  Attributes:',\n)\ns.replace(\n    \"google/cloud/bigquery_v2/proto/encryption_config_pb2.py\",\n    '\"\"\"Attributes:',\n    '\"\"\"Encryption configuration.\\n\\n  Attributes:',\n)\n\n# Remove non-ascii characters from docstrings for Python 2.7.\n# Format quoted strings as plain text.\ns.replace(\"google/cloud/bigquery_v2/proto/*.py\", \"[\u201c\u201d]\", '``')\n\n# ----------------------------------------------------------------------------\n# Add templated files\n# ----------------------------------------------------------------------------\ntemplated_files = common.py_library(cov_level=100)\ns.move(templated_files, excludes=[\"noxfile.py\"])\n\ns.shell.run([\"nox\", \"-s\", \"blacken\"], hide_output=False)\n", "path": "synth.py"}]}