We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
EHN: New geoaccessor `toposimiplify`
<!--
Thanks for contributing a pull request!

Please follow these standard acronyms to start the commit message:

- ENH: enhancement
- BUG: bug fix
- DOC: documentation
- TYP: type annotations
- TST: addition or modification of tests
- MAINT: maintenance commit (refactoring, typos, etc.)
- BLD: change related to building
- REL: related to releasing
- API: an (incompatible) API change
- DEP: deprecate something, or remove a deprecated object
- DEV: development tool or utility
- REV: revert an earlier commit
- PERF: performance improvement
- BOT: always commit via a bot
- CI: related to CI or CD
- CLN: Code cleanup
-->

- [ ] closes #xxxx
- [x] whatsnew entry

simplify multi-geometries method but could keep the shared edges

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dtoolkit/geoaccessor/geoseries/toposimplify.py`
Content:
```
1 from __future__ import annotations
2 
3 from typing import Literal
4 
5 import geopandas as gpd
6 from pandas.util._decorators import doc
7 
8 from dtoolkit.accessor.dataframe import to_series  # noqa: F401
9 from dtoolkit.geoaccessor.register import register_geoseries_method
10 
11 
12 @register_geoseries_method
13 @doc(klass=":class:`~geopandas.GeoSeries`")
14 def toposimplify(
15     s: gpd.GeoSeries,
16     /,
17     tolerance: float,
18     simplify_algorithm: Literal["dp", "vw"] = "dp",
19     simplify_with: Literal["shapely", "simplification"] = "shapely",
20     prevent_oversimplify: bool = True,
21 ) -> gpd.GeoSeries:
22     """
23     Apply :func:`topojson.Topology.toposimplify` to {klass} to keep **shared edges**.
24 
25     Parameters
26     ----------
27     tolerance : float
28         All parts of a simplified geometry will be no more than tolerance distance from
29         the original.
30 
31     simplify_algorithm : {{'dp', 'vw'}}, default 'dp'
32         ``vw`` will only be selected if ``simplify_with`` is set to ``simplification``.
33             - ``dp`` : Douglas-Peucker
34             - ``vw`` : Visvalingam-Whyatt
35 
36     simplify_with : {{'shapely', 'simplification'}}, default 'shapely'
37         Sets the package to use for simplifying. Shapely adopts solely Douglas-Peucker
38         and simplification both Douglas-Peucker and Visvalingam-Whyatt. The package
39         simplification is known to be quicker than shapely.
40 
41     prevent_oversimplify : bool, default True
42         If `True`, the simplification is slower, but the likelihood of producing
43         valid geometries is higher as it prevents oversimplification. Simplification
44         happens on paths separately, so this setting is especially relevant for rings
45         with no partial shared paths. This is also known as a topology-preserving
46         variant of simplification.
47 
48     Returns
49     -------
50     {klass}
51 
52     Raises
53     ------
54     ModuleNotFoundError
55         - If don't have module named 'topojson'.
56         - If don't have module named 'simplification'.
57 
58     See Also
59     --------
60     geopandas.GeoSeries.simplify
61     dtoolkit.geoaccessor.geoseries.toposimplify
62     dtoolkit.geoaccessor.geodataframe.toposimplify
63     topojson.Topology.toposimplify
64         https://mattijn.github.io/topojson/api/topojson.core.topology.html#toposimplify
65 
66     Examples
67     --------
68     >>> import dtoolkit.geoaccessor
69     >>> import geopandas as gpd
70     >>> df = (
71     ...     gpd.read_file(gpd.datasets.get_path("naturalearth_lowres"))
72     ...     .query('continent == "Africa"')
73     ... )
74     >>> df.head()
75            pop_est  ...                                           geometry
76     1   58005463.0  ...  POLYGON ((33.90371 -0.95000, 34.07262 -1.05982...
77     2     603253.0  ...  POLYGON ((-8.66559 27.65643, -8.66512 27.58948...
78     11  86790567.0  ...  POLYGON ((29.34000 -4.49998, 29.51999 -5.41998...
79     12  10192317.3  ...  POLYGON ((41.58513 -1.68325, 40.99300 -0.85829...
80     13  52573973.0  ...  POLYGON ((39.20222 -4.67677, 37.76690 -3.67712...
81     <BLANKLINE>
82     [5 rows x 6 columns]
83     >>> df.toposimplify(0.1).head()
84            pop_est  ...                                           geometry
85     1   58005463.0  ...  POLYGON ((33.90367 -0.95000, 30.76984 -1.01452...
86     2     603253.0  ...  POLYGON ((-8.66561 27.65644, -8.81786 27.65644...
87     11  86790567.0  ...  POLYGON ((29.33999 -4.50001, 29.27634 -3.29391...
88     12  10192317.3  ...  POLYGON ((41.58509 -1.68324, 42.04156 -0.91918...
89     13  52573973.0  ...  POLYGON ((39.20220 -4.67675, 39.60493 -4.34650...
90     <BLANKLINE>
91     [5 rows x 6 columns]
92 
93     .. plot::
94 
95         import dtoolkit.geoaccessor
96         import geopandas as gpd
97         import matplotlib.pyplot as plt
98 
99 
100         df = (
101             gpd.read_file(gpd.datasets.get_path("naturalearth_lowres"))
102             .query('continent == "Africa"')
103         )
104 
105         fig, (ax1, ax2) = plt.subplots(ncols=2, sharex=True, sharey=True)
106 
107         df.simplify(1).plot(ax=ax1, alpha=0.7)
108         df.toposimplify(1).plot(ax=ax2, alpha=0.7)
109 
110         ax1.set_title("simplify")
111         ax1.set_axis_off()
112         ax2.set_title("toposimplify")
113         ax2.set_axis_off()
114         fig.tight_layout()
115         plt.show()
116     """
117     from topojson import Topology
118 
119     return (
120         Topology(
121             s,
122             toposimplify=tolerance,
123             simplify_algorithm=simplify_algorithm,
124             simplify_with=simplify_with,
125             prevent_oversimplify=prevent_oversimplify,
126         )
127         # `to_gdf` return is a GeoDataFrame, require GeoSeries
128         .to_gdf(crs=s.crs).to_series()
129         # To fix https://github.com/mattijn/topojson/issues/164
130         .set_axis(s.index)
131     )
132
```
--- 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/dtoolkit/geoaccessor/geoseries/toposimplify.py b/dtoolkit/geoaccessor/geoseries/toposimplify.py
--- a/dtoolkit/geoaccessor/geoseries/toposimplify.py
+++ b/dtoolkit/geoaccessor/geoseries/toposimplify.py
@@ -20,7 +20,12 @@
     prevent_oversimplify: bool = True,
 ) -> gpd.GeoSeries:
     """
-    Apply :func:`topojson.Topology.toposimplify` to {klass} to keep **shared edges**.
+    Returns a {klass} containing a simplified representation of each geometry.
+    Similar to :meth:`~geopandas.GeoSeries.simplify`, but keeps shared edges.
+
+    .. image:: ../../../../_static/simplify-vs-toposimplify.png
+        :width: 80%
+        :align: center
 
     Parameters
     ----------
@@ -89,30 +94,6 @@
     13  52573973.0  ...  POLYGON ((39.20220 -4.67675, 39.60493 -4.34650...
     <BLANKLINE>
     [5 rows x 6 columns]
-
-    .. plot::
-
-        import dtoolkit.geoaccessor
-        import geopandas as gpd
-        import matplotlib.pyplot as plt
-
-
-        df = (
-            gpd.read_file(gpd.datasets.get_path("naturalearth_lowres"))
-            .query('continent == "Africa"')
-        )
-
-        fig, (ax1, ax2) = plt.subplots(ncols=2, sharex=True, sharey=True)
-
-        df.simplify(1).plot(ax=ax1, alpha=0.7)
-        df.toposimplify(1).plot(ax=ax2, alpha=0.7)
-
-        ax1.set_title("simplify")
-        ax1.set_axis_off()
-        ax2.set_title("toposimplify")
-        ax2.set_axis_off()
-        fig.tight_layout()
-        plt.show()
     """
     from topojson import Topology

{"golden_diff": "diff --git a/dtoolkit/geoaccessor/geoseries/toposimplify.py b/dtoolkit/geoaccessor/geoseries/toposimplify.py\n--- a/dtoolkit/geoaccessor/geoseries/toposimplify.py\n+++ b/dtoolkit/geoaccessor/geoseries/toposimplify.py\n@@ -20,7 +20,12 @@\n     prevent_oversimplify: bool = True,\n ) -> gpd.GeoSeries:\n     \"\"\"\n-    Apply :func:`topojson.Topology.toposimplify` to {klass} to keep **shared edges**.\n+    Returns a {klass} containing a simplified representation of each geometry.\n+    Similar to :meth:`~geopandas.GeoSeries.simplify`, but keeps shared edges.\n+\n+    .. image:: ../../../../_static/simplify-vs-toposimplify.png\n+        :width: 80%\n+        :align: center\n \n     Parameters\n     ----------\n@@ -89,30 +94,6 @@\n     13  52573973.0  ...  POLYGON ((39.20220 -4.67675, 39.60493 -4.34650...\n     <BLANKLINE>\n     [5 rows x 6 columns]\n-\n-    .. plot::\n-\n-        import dtoolkit.geoaccessor\n-        import geopandas as gpd\n-        import matplotlib.pyplot as plt\n-\n-\n-        df = (\n-            gpd.read_file(gpd.datasets.get_path(\"naturalearth_lowres\"))\n-            .query('continent == \"Africa\"')\n-        )\n-\n-        fig, (ax1, ax2) = plt.subplots(ncols=2, sharex=True, sharey=True)\n-\n-        df.simplify(1).plot(ax=ax1, alpha=0.7)\n-        df.toposimplify(1).plot(ax=ax2, alpha=0.7)\n-\n-        ax1.set_title(\"simplify\")\n-        ax1.set_axis_off()\n-        ax2.set_title(\"toposimplify\")\n-        ax2.set_axis_off()\n-        fig.tight_layout()\n-        plt.show()\n     \"\"\"\n     from topojson import Topology\n", "issue": "EHN: New geoaccessor `toposimiplify`\n<!--\r\nThanks for contributing a pull request!\r\n\r\nPlease follow these standard acronyms to start the commit message:\r\n\r\n- ENH: enhancement\r\n- BUG: bug fix\r\n- DOC: documentation\r\n- TYP: type annotations\r\n- TST: addition or modification of tests\r\n- MAINT: maintenance commit (refactoring, typos, etc.)\r\n- BLD: change related to building\r\n- REL: related to releasing\r\n- API: an (incompatible) API change\r\n- DEP: deprecate something, or remove a deprecated object\r\n- DEV: development tool or utility\r\n- REV: revert an earlier commit\r\n- PERF: performance improvement\r\n- BOT: always commit via a bot\r\n- CI: related to CI or CD\r\n- CLN: Code cleanup\r\n-->\r\n\r\n- [ ] closes #xxxx\r\n- [x] whatsnew entry\r\n\r\nsimplify multi-geometries method but could keep the shared edges\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom typing import Literal\n\nimport geopandas as gpd\nfrom pandas.util._decorators import doc\n\nfrom dtoolkit.accessor.dataframe import to_series  # noqa: F401\nfrom dtoolkit.geoaccessor.register import register_geoseries_method\n\n\n@register_geoseries_method\n@doc(klass=\":class:`~geopandas.GeoSeries`\")\ndef toposimplify(\n    s: gpd.GeoSeries,\n    /,\n    tolerance: float,\n    simplify_algorithm: Literal[\"dp\", \"vw\"] = \"dp\",\n    simplify_with: Literal[\"shapely\", \"simplification\"] = \"shapely\",\n    prevent_oversimplify: bool = True,\n) -> gpd.GeoSeries:\n    \"\"\"\n    Apply :func:`topojson.Topology.toposimplify` to {klass} to keep **shared edges**.\n\n    Parameters\n    ----------\n    tolerance : float\n        All parts of a simplified geometry will be no more than tolerance distance from\n        the original.\n\n    simplify_algorithm : {{'dp', 'vw'}}, default 'dp'\n        ``vw`` will only be selected if ``simplify_with`` is set to ``simplification``.\n            - ``dp`` : Douglas-Peucker\n            - ``vw`` : Visvalingam-Whyatt\n\n    simplify_with : {{'shapely', 'simplification'}}, default 'shapely'\n        Sets the package to use for simplifying. Shapely adopts solely Douglas-Peucker\n        and simplification both Douglas-Peucker and Visvalingam-Whyatt. The package\n        simplification is known to be quicker than shapely.\n\n    prevent_oversimplify : bool, default True\n        If `True`, the simplification is slower, but the likelihood of producing\n        valid geometries is higher as it prevents oversimplification. Simplification\n        happens on paths separately, so this setting is especially relevant for rings\n        with no partial shared paths. This is also known as a topology-preserving\n        variant of simplification.\n\n    Returns\n    -------\n    {klass}\n\n    Raises\n    ------\n    ModuleNotFoundError\n        - If don't have module named 'topojson'.\n        - If don't have module named 'simplification'.\n\n    See Also\n    --------\n    geopandas.GeoSeries.simplify\n    dtoolkit.geoaccessor.geoseries.toposimplify\n    dtoolkit.geoaccessor.geodataframe.toposimplify\n    topojson.Topology.toposimplify\n        https://mattijn.github.io/topojson/api/topojson.core.topology.html#toposimplify\n\n    Examples\n    --------\n    >>> import dtoolkit.geoaccessor\n    >>> import geopandas as gpd\n    >>> df = (\n    ...     gpd.read_file(gpd.datasets.get_path(\"naturalearth_lowres\"))\n    ...     .query('continent == \"Africa\"')\n    ... )\n    >>> df.head()\n           pop_est  ...                                           geometry\n    1   58005463.0  ...  POLYGON ((33.90371 -0.95000, 34.07262 -1.05982...\n    2     603253.0  ...  POLYGON ((-8.66559 27.65643, -8.66512 27.58948...\n    11  86790567.0  ...  POLYGON ((29.34000 -4.49998, 29.51999 -5.41998...\n    12  10192317.3  ...  POLYGON ((41.58513 -1.68325, 40.99300 -0.85829...\n    13  52573973.0  ...  POLYGON ((39.20222 -4.67677, 37.76690 -3.67712...\n    <BLANKLINE>\n    [5 rows x 6 columns]\n    >>> df.toposimplify(0.1).head()\n           pop_est  ...                                           geometry\n    1   58005463.0  ...  POLYGON ((33.90367 -0.95000, 30.76984 -1.01452...\n    2     603253.0  ...  POLYGON ((-8.66561 27.65644, -8.81786 27.65644...\n    11  86790567.0  ...  POLYGON ((29.33999 -4.50001, 29.27634 -3.29391...\n    12  10192317.3  ...  POLYGON ((41.58509 -1.68324, 42.04156 -0.91918...\n    13  52573973.0  ...  POLYGON ((39.20220 -4.67675, 39.60493 -4.34650...\n    <BLANKLINE>\n    [5 rows x 6 columns]\n\n    .. plot::\n\n        import dtoolkit.geoaccessor\n        import geopandas as gpd\n        import matplotlib.pyplot as plt\n\n\n        df = (\n            gpd.read_file(gpd.datasets.get_path(\"naturalearth_lowres\"))\n            .query('continent == \"Africa\"')\n        )\n\n        fig, (ax1, ax2) = plt.subplots(ncols=2, sharex=True, sharey=True)\n\n        df.simplify(1).plot(ax=ax1, alpha=0.7)\n        df.toposimplify(1).plot(ax=ax2, alpha=0.7)\n\n        ax1.set_title(\"simplify\")\n        ax1.set_axis_off()\n        ax2.set_title(\"toposimplify\")\n        ax2.set_axis_off()\n        fig.tight_layout()\n        plt.show()\n    \"\"\"\n    from topojson import Topology\n\n    return (\n        Topology(\n            s,\n            toposimplify=tolerance,\n            simplify_algorithm=simplify_algorithm,\n            simplify_with=simplify_with,\n            prevent_oversimplify=prevent_oversimplify,\n        )\n        # `to_gdf` return is a GeoDataFrame, require GeoSeries\n        .to_gdf(crs=s.crs).to_series()\n        # To fix https://github.com/mattijn/topojson/issues/164\n        .set_axis(s.index)\n    )\n", "path": "dtoolkit/geoaccessor/geoseries/toposimplify.py"}], "after_files": [{"content": "from __future__ import annotations\n\nfrom typing import Literal\n\nimport geopandas as gpd\nfrom pandas.util._decorators import doc\n\nfrom dtoolkit.accessor.dataframe import to_series  # noqa: F401\nfrom dtoolkit.geoaccessor.register import register_geoseries_method\n\n\n@register_geoseries_method\n@doc(klass=\":class:`~geopandas.GeoSeries`\")\ndef toposimplify(\n    s: gpd.GeoSeries,\n    /,\n    tolerance: float,\n    simplify_algorithm: Literal[\"dp\", \"vw\"] = \"dp\",\n    simplify_with: Literal[\"shapely\", \"simplification\"] = \"shapely\",\n    prevent_oversimplify: bool = True,\n) -> gpd.GeoSeries:\n    \"\"\"\n    Returns a {klass} containing a simplified representation of each geometry.\n    Similar to :meth:`~geopandas.GeoSeries.simplify`, but keeps shared edges.\n\n    .. image:: ../../../../_static/simplify-vs-toposimplify.png\n        :width: 80%\n        :align: center\n\n    Parameters\n    ----------\n    tolerance : float\n        All parts of a simplified geometry will be no more than tolerance distance from\n        the original.\n\n    simplify_algorithm : {{'dp', 'vw'}}, default 'dp'\n        ``vw`` will only be selected if ``simplify_with`` is set to ``simplification``.\n            - ``dp`` : Douglas-Peucker\n            - ``vw`` : Visvalingam-Whyatt\n\n    simplify_with : {{'shapely', 'simplification'}}, default 'shapely'\n        Sets the package to use for simplifying. Shapely adopts solely Douglas-Peucker\n        and simplification both Douglas-Peucker and Visvalingam-Whyatt. The package\n        simplification is known to be quicker than shapely.\n\n    prevent_oversimplify : bool, default True\n        If `True`, the simplification is slower, but the likelihood of producing\n        valid geometries is higher as it prevents oversimplification. Simplification\n        happens on paths separately, so this setting is especially relevant for rings\n        with no partial shared paths. This is also known as a topology-preserving\n        variant of simplification.\n\n    Returns\n    -------\n    {klass}\n\n    Raises\n    ------\n    ModuleNotFoundError\n        - If don't have module named 'topojson'.\n        - If don't have module named 'simplification'.\n\n    See Also\n    --------\n    geopandas.GeoSeries.simplify\n    dtoolkit.geoaccessor.geoseries.toposimplify\n    dtoolkit.geoaccessor.geodataframe.toposimplify\n    topojson.Topology.toposimplify\n        https://mattijn.github.io/topojson/api/topojson.core.topology.html#toposimplify\n\n    Examples\n    --------\n    >>> import dtoolkit.geoaccessor\n    >>> import geopandas as gpd\n    >>> df = (\n    ...     gpd.read_file(gpd.datasets.get_path(\"naturalearth_lowres\"))\n    ...     .query('continent == \"Africa\"')\n    ... )\n    >>> df.head()\n           pop_est  ...                                           geometry\n    1   58005463.0  ...  POLYGON ((33.90371 -0.95000, 34.07262 -1.05982...\n    2     603253.0  ...  POLYGON ((-8.66559 27.65643, -8.66512 27.58948...\n    11  86790567.0  ...  POLYGON ((29.34000 -4.49998, 29.51999 -5.41998...\n    12  10192317.3  ...  POLYGON ((41.58513 -1.68325, 40.99300 -0.85829...\n    13  52573973.0  ...  POLYGON ((39.20222 -4.67677, 37.76690 -3.67712...\n    <BLANKLINE>\n    [5 rows x 6 columns]\n    >>> df.toposimplify(0.1).head()\n           pop_est  ...                                           geometry\n    1   58005463.0  ...  POLYGON ((33.90367 -0.95000, 30.76984 -1.01452...\n    2     603253.0  ...  POLYGON ((-8.66561 27.65644, -8.81786 27.65644...\n    11  86790567.0  ...  POLYGON ((29.33999 -4.50001, 29.27634 -3.29391...\n    12  10192317.3  ...  POLYGON ((41.58509 -1.68324, 42.04156 -0.91918...\n    13  52573973.0  ...  POLYGON ((39.20220 -4.67675, 39.60493 -4.34650...\n    <BLANKLINE>\n    [5 rows x 6 columns]\n    \"\"\"\n    from topojson import Topology\n\n    return (\n        Topology(\n            s,\n            toposimplify=tolerance,\n            simplify_algorithm=simplify_algorithm,\n            simplify_with=simplify_with,\n            prevent_oversimplify=prevent_oversimplify,\n        )\n        # `to_gdf` return is a GeoDataFrame, require GeoSeries\n        .to_gdf(crs=s.crs).to_series()\n        # To fix https://github.com/mattijn/topojson/issues/164\n        .set_axis(s.index)\n    )\n", "path": "dtoolkit/geoaccessor/geoseries/toposimplify.py"}]}