We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] `dash.get_relative_path()` docstring out of date
Docstrings for `dash.get_relative_path()` and `dash.strip_relative_path()` still refer to the `app` way of accessing those functions, which creates inconsistency in the docs:

![Screen Shot 2023-05-02 at 2 44 32 PM](https://user-images.githubusercontent.com/4672118/235759684-d386ad8c-cee1-48a4-ba6c-9b54fb442440.png)

https://dash.plotly.com/reference#dash.get_relative_path

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dash/_get_paths.py`
Content:
```
1 from ._utils import AttributeDict
2 from . import exceptions
3 
4 CONFIG = AttributeDict()
5 
6 
7 def get_asset_url(path):
8     return app_get_asset_url(CONFIG, path)
9 
10 
11 def app_get_asset_url(config, path):
12     if config.assets_external_path:
13         prefix = config.assets_external_path
14     else:
15         prefix = config.requests_pathname_prefix
16     return "/".join(
17         [
18             # Only take the first part of the pathname
19             prefix.rstrip("/"),
20             config.assets_url_path.lstrip("/"),
21             path,
22         ]
23     )
24 
25 
26 def get_relative_path(path):
27     """
28     Return a path with `requests_pathname_prefix` prefixed before it.
29     Use this function when specifying local URL paths that will work
30     in environments regardless of what `requests_pathname_prefix` is.
31     In some deployment environments, like Dash Enterprise,
32     `requests_pathname_prefix` is set to the application name,
33     e.g. `my-dash-app`.
34     When working locally, `requests_pathname_prefix` might be unset and
35     so a relative URL like `/page-2` can just be `/page-2`.
36     However, when the app is deployed to a URL like `/my-dash-app`, then
37     `app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`.
38     This can be used as an alternative to `get_asset_url` as well with
39     `app.get_relative_path('/assets/logo.png')`
40 
41     Use this function with `app.strip_relative_path` in callbacks that
42     deal with `dcc.Location` `pathname` routing.
43     That is, your usage may look like:
44     ```
45     app.layout = html.Div([
46         dcc.Location(id='url'),
47         html.Div(id='content')
48     ])
49     @app.callback(Output('content', 'children'), [Input('url', 'pathname')])
50     def display_content(path):
51         page_name = app.strip_relative_path(path)
52         if not page_name:  # None or ''
53             return html.Div([
54                 dcc.Link(href=app.get_relative_path('/page-1')),
55                 dcc.Link(href=app.get_relative_path('/page-2')),
56             ])
57         elif page_name == 'page-1':
58             return chapters.page_1
59         if page_name == "page-2":
60             return chapters.page_2
61     ```
62     """
63     return app_get_relative_path(CONFIG.requests_pathname_prefix, path)
64 
65 
66 def app_get_relative_path(requests_pathname, path):
67     if requests_pathname == "/" and path == "":
68         return "/"
69     if requests_pathname != "/" and path == "":
70         return requests_pathname
71     if not path.startswith("/"):
72         raise exceptions.UnsupportedRelativePath(
73             f"""
74             Paths that aren't prefixed with a leading / are not supported.
75             You supplied: {path}
76             """
77         )
78     return "/".join([requests_pathname.rstrip("/"), path.lstrip("/")])
79 
80 
81 def strip_relative_path(path):
82     """
83     Return a path with `requests_pathname_prefix` and leading and trailing
84     slashes stripped from it. Also, if None is passed in, None is returned.
85     Use this function with `get_relative_path` in callbacks that deal
86     with `dcc.Location` `pathname` routing.
87     That is, your usage may look like:
88     ```
89     app.layout = html.Div([
90         dcc.Location(id='url'),
91         html.Div(id='content')
92     ])
93     @app.callback(Output('content', 'children'), [Input('url', 'pathname')])
94     def display_content(path):
95         page_name = app.strip_relative_path(path)
96         if not page_name:  # None or ''
97             return html.Div([
98                 dcc.Link(href=app.get_relative_path('/page-1')),
99                 dcc.Link(href=app.get_relative_path('/page-2')),
100             ])
101         elif page_name == 'page-1':
102             return chapters.page_1
103         if page_name == "page-2":
104             return chapters.page_2
105     ```
106     Note that `chapters.page_1` will be served if the user visits `/page-1`
107     _or_ `/page-1/` since `strip_relative_path` removes the trailing slash.
108 
109     Also note that `strip_relative_path` is compatible with
110     `get_relative_path` in environments where `requests_pathname_prefix` set.
111     In some deployment environments, like Dash Enterprise,
112     `requests_pathname_prefix` is set to the application name, e.g. `my-dash-app`.
113     When working locally, `requests_pathname_prefix` might be unset and
114     so a relative URL like `/page-2` can just be `/page-2`.
115     However, when the app is deployed to a URL like `/my-dash-app`, then
116     `app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`
117 
118     The `pathname` property of `dcc.Location` will return '`/my-dash-app/page-2`'
119     to the callback.
120     In this case, `app.strip_relative_path('/my-dash-app/page-2')`
121     will return `'page-2'`
122 
123     For nested URLs, slashes are still included:
124     `app.strip_relative_path('/page-1/sub-page-1/')` will return
125     `page-1/sub-page-1`
126     ```
127     """
128     return app_strip_relative_path(CONFIG.requests_pathname_prefix, path)
129 
130 
131 def app_strip_relative_path(requests_pathname, path):
132     if path is None:
133         return None
134     if (
135         requests_pathname != "/" and not path.startswith(requests_pathname.rstrip("/"))
136     ) or (requests_pathname == "/" and not path.startswith("/")):
137         raise exceptions.UnsupportedRelativePath(
138             f"""
139             Paths that aren't prefixed with requests_pathname_prefix are not supported.
140             You supplied: {path} and requests_pathname_prefix was {requests_pathname}
141             """
142         )
143     if requests_pathname != "/" and path.startswith(requests_pathname.rstrip("/")):
144         path = path.replace(
145             # handle the case where the path might be `/my-dash-app`
146             # but the requests_pathname_prefix is `/my-dash-app/`
147             requests_pathname.rstrip("/"),
148             "",
149             1,
150         )
151     return path.strip("/")
152
```
--- 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/dash/_get_paths.py b/dash/_get_paths.py
--- a/dash/_get_paths.py
+++ b/dash/_get_paths.py
@@ -34,11 +34,11 @@
     When working locally, `requests_pathname_prefix` might be unset and
     so a relative URL like `/page-2` can just be `/page-2`.
     However, when the app is deployed to a URL like `/my-dash-app`, then
-    `app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`.
+    `dash.get_relative_path('/page-2')` will return `/my-dash-app/page-2`.
     This can be used as an alternative to `get_asset_url` as well with
-    `app.get_relative_path('/assets/logo.png')`
+    `dash.get_relative_path('/assets/logo.png')`
 
-    Use this function with `app.strip_relative_path` in callbacks that
+    Use this function with `dash.strip_relative_path` in callbacks that
     deal with `dcc.Location` `pathname` routing.
     That is, your usage may look like:
     ```
@@ -46,13 +46,13 @@
         dcc.Location(id='url'),
         html.Div(id='content')
     ])
-    @app.callback(Output('content', 'children'), [Input('url', 'pathname')])
+    @dash.callback(Output('content', 'children'), [Input('url', 'pathname')])
     def display_content(path):
-        page_name = app.strip_relative_path(path)
+        page_name = dash.strip_relative_path(path)
         if not page_name:  # None or ''
             return html.Div([
-                dcc.Link(href=app.get_relative_path('/page-1')),
-                dcc.Link(href=app.get_relative_path('/page-2')),
+                dcc.Link(href=dash.get_relative_path('/page-1')),
+                dcc.Link(href=dash.get_relative_path('/page-2')),
             ])
         elif page_name == 'page-1':
             return chapters.page_1
@@ -90,13 +90,13 @@
         dcc.Location(id='url'),
         html.Div(id='content')
     ])
-    @app.callback(Output('content', 'children'), [Input('url', 'pathname')])
+    @dash.callback(Output('content', 'children'), [Input('url', 'pathname')])
     def display_content(path):
-        page_name = app.strip_relative_path(path)
+        page_name = dash.strip_relative_path(path)
         if not page_name:  # None or ''
             return html.Div([
-                dcc.Link(href=app.get_relative_path('/page-1')),
-                dcc.Link(href=app.get_relative_path('/page-2')),
+                dcc.Link(href=dash.get_relative_path('/page-1')),
+                dcc.Link(href=dash.get_relative_path('/page-2')),
             ])
         elif page_name == 'page-1':
             return chapters.page_1
@@ -113,15 +113,15 @@
     When working locally, `requests_pathname_prefix` might be unset and
     so a relative URL like `/page-2` can just be `/page-2`.
     However, when the app is deployed to a URL like `/my-dash-app`, then
-    `app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`
+    `dash.get_relative_path('/page-2')` will return `/my-dash-app/page-2`
 
     The `pathname` property of `dcc.Location` will return '`/my-dash-app/page-2`'
     to the callback.
-    In this case, `app.strip_relative_path('/my-dash-app/page-2')`
+    In this case, `dash.strip_relative_path('/my-dash-app/page-2')`
     will return `'page-2'`
 
     For nested URLs, slashes are still included:
-    `app.strip_relative_path('/page-1/sub-page-1/')` will return
+    `dash.strip_relative_path('/page-1/sub-page-1/')` will return
     `page-1/sub-page-1`
     ```
     """

{"golden_diff": "diff --git a/dash/_get_paths.py b/dash/_get_paths.py\n--- a/dash/_get_paths.py\n+++ b/dash/_get_paths.py\n@@ -34,11 +34,11 @@\n     When working locally, `requests_pathname_prefix` might be unset and\n     so a relative URL like `/page-2` can just be `/page-2`.\n     However, when the app is deployed to a URL like `/my-dash-app`, then\n-    `app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`.\n+    `dash.get_relative_path('/page-2')` will return `/my-dash-app/page-2`.\n     This can be used as an alternative to `get_asset_url` as well with\n-    `app.get_relative_path('/assets/logo.png')`\n+    `dash.get_relative_path('/assets/logo.png')`\n \n-    Use this function with `app.strip_relative_path` in callbacks that\n+    Use this function with `dash.strip_relative_path` in callbacks that\n     deal with `dcc.Location` `pathname` routing.\n     That is, your usage may look like:\n     ```\n@@ -46,13 +46,13 @@\n         dcc.Location(id='url'),\n         html.Div(id='content')\n     ])\n-    @app.callback(Output('content', 'children'), [Input('url', 'pathname')])\n+    @dash.callback(Output('content', 'children'), [Input('url', 'pathname')])\n     def display_content(path):\n-        page_name = app.strip_relative_path(path)\n+        page_name = dash.strip_relative_path(path)\n         if not page_name:  # None or ''\n             return html.Div([\n-                dcc.Link(href=app.get_relative_path('/page-1')),\n-                dcc.Link(href=app.get_relative_path('/page-2')),\n+                dcc.Link(href=dash.get_relative_path('/page-1')),\n+                dcc.Link(href=dash.get_relative_path('/page-2')),\n             ])\n         elif page_name == 'page-1':\n             return chapters.page_1\n@@ -90,13 +90,13 @@\n         dcc.Location(id='url'),\n         html.Div(id='content')\n     ])\n-    @app.callback(Output('content', 'children'), [Input('url', 'pathname')])\n+    @dash.callback(Output('content', 'children'), [Input('url', 'pathname')])\n     def display_content(path):\n-        page_name = app.strip_relative_path(path)\n+        page_name = dash.strip_relative_path(path)\n         if not page_name:  # None or ''\n             return html.Div([\n-                dcc.Link(href=app.get_relative_path('/page-1')),\n-                dcc.Link(href=app.get_relative_path('/page-2')),\n+                dcc.Link(href=dash.get_relative_path('/page-1')),\n+                dcc.Link(href=dash.get_relative_path('/page-2')),\n             ])\n         elif page_name == 'page-1':\n             return chapters.page_1\n@@ -113,15 +113,15 @@\n     When working locally, `requests_pathname_prefix` might be unset and\n     so a relative URL like `/page-2` can just be `/page-2`.\n     However, when the app is deployed to a URL like `/my-dash-app`, then\n-    `app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`\n+    `dash.get_relative_path('/page-2')` will return `/my-dash-app/page-2`\n \n     The `pathname` property of `dcc.Location` will return '`/my-dash-app/page-2`'\n     to the callback.\n-    In this case, `app.strip_relative_path('/my-dash-app/page-2')`\n+    In this case, `dash.strip_relative_path('/my-dash-app/page-2')`\n     will return `'page-2'`\n \n     For nested URLs, slashes are still included:\n-    `app.strip_relative_path('/page-1/sub-page-1/')` will return\n+    `dash.strip_relative_path('/page-1/sub-page-1/')` will return\n     `page-1/sub-page-1`\n     ```\n     \"\"\"\n", "issue": "[BUG] `dash.get_relative_path()` docstring out of date\nDocstrings for `dash.get_relative_path()` and `dash.strip_relative_path()` still refer to the `app` way of accessing those functions, which creates inconsistency in the docs:\r\n\r\n![Screen Shot 2023-05-02 at 2 44 32 PM](https://user-images.githubusercontent.com/4672118/235759684-d386ad8c-cee1-48a4-ba6c-9b54fb442440.png)\r\n\r\nhttps://dash.plotly.com/reference#dash.get_relative_path\n", "before_files": [{"content": "from ._utils import AttributeDict\nfrom . import exceptions\n\nCONFIG = AttributeDict()\n\n\ndef get_asset_url(path):\n    return app_get_asset_url(CONFIG, path)\n\n\ndef app_get_asset_url(config, path):\n    if config.assets_external_path:\n        prefix = config.assets_external_path\n    else:\n        prefix = config.requests_pathname_prefix\n    return \"/\".join(\n        [\n            # Only take the first part of the pathname\n            prefix.rstrip(\"/\"),\n            config.assets_url_path.lstrip(\"/\"),\n            path,\n        ]\n    )\n\n\ndef get_relative_path(path):\n    \"\"\"\n    Return a path with `requests_pathname_prefix` prefixed before it.\n    Use this function when specifying local URL paths that will work\n    in environments regardless of what `requests_pathname_prefix` is.\n    In some deployment environments, like Dash Enterprise,\n    `requests_pathname_prefix` is set to the application name,\n    e.g. `my-dash-app`.\n    When working locally, `requests_pathname_prefix` might be unset and\n    so a relative URL like `/page-2` can just be `/page-2`.\n    However, when the app is deployed to a URL like `/my-dash-app`, then\n    `app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`.\n    This can be used as an alternative to `get_asset_url` as well with\n    `app.get_relative_path('/assets/logo.png')`\n\n    Use this function with `app.strip_relative_path` in callbacks that\n    deal with `dcc.Location` `pathname` routing.\n    That is, your usage may look like:\n    ```\n    app.layout = html.Div([\n        dcc.Location(id='url'),\n        html.Div(id='content')\n    ])\n    @app.callback(Output('content', 'children'), [Input('url', 'pathname')])\n    def display_content(path):\n        page_name = app.strip_relative_path(path)\n        if not page_name:  # None or ''\n            return html.Div([\n                dcc.Link(href=app.get_relative_path('/page-1')),\n                dcc.Link(href=app.get_relative_path('/page-2')),\n            ])\n        elif page_name == 'page-1':\n            return chapters.page_1\n        if page_name == \"page-2\":\n            return chapters.page_2\n    ```\n    \"\"\"\n    return app_get_relative_path(CONFIG.requests_pathname_prefix, path)\n\n\ndef app_get_relative_path(requests_pathname, path):\n    if requests_pathname == \"/\" and path == \"\":\n        return \"/\"\n    if requests_pathname != \"/\" and path == \"\":\n        return requests_pathname\n    if not path.startswith(\"/\"):\n        raise exceptions.UnsupportedRelativePath(\n            f\"\"\"\n            Paths that aren't prefixed with a leading / are not supported.\n            You supplied: {path}\n            \"\"\"\n        )\n    return \"/\".join([requests_pathname.rstrip(\"/\"), path.lstrip(\"/\")])\n\n\ndef strip_relative_path(path):\n    \"\"\"\n    Return a path with `requests_pathname_prefix` and leading and trailing\n    slashes stripped from it. Also, if None is passed in, None is returned.\n    Use this function with `get_relative_path` in callbacks that deal\n    with `dcc.Location` `pathname` routing.\n    That is, your usage may look like:\n    ```\n    app.layout = html.Div([\n        dcc.Location(id='url'),\n        html.Div(id='content')\n    ])\n    @app.callback(Output('content', 'children'), [Input('url', 'pathname')])\n    def display_content(path):\n        page_name = app.strip_relative_path(path)\n        if not page_name:  # None or ''\n            return html.Div([\n                dcc.Link(href=app.get_relative_path('/page-1')),\n                dcc.Link(href=app.get_relative_path('/page-2')),\n            ])\n        elif page_name == 'page-1':\n            return chapters.page_1\n        if page_name == \"page-2\":\n            return chapters.page_2\n    ```\n    Note that `chapters.page_1` will be served if the user visits `/page-1`\n    _or_ `/page-1/` since `strip_relative_path` removes the trailing slash.\n\n    Also note that `strip_relative_path` is compatible with\n    `get_relative_path` in environments where `requests_pathname_prefix` set.\n    In some deployment environments, like Dash Enterprise,\n    `requests_pathname_prefix` is set to the application name, e.g. `my-dash-app`.\n    When working locally, `requests_pathname_prefix` might be unset and\n    so a relative URL like `/page-2` can just be `/page-2`.\n    However, when the app is deployed to a URL like `/my-dash-app`, then\n    `app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`\n\n    The `pathname` property of `dcc.Location` will return '`/my-dash-app/page-2`'\n    to the callback.\n    In this case, `app.strip_relative_path('/my-dash-app/page-2')`\n    will return `'page-2'`\n\n    For nested URLs, slashes are still included:\n    `app.strip_relative_path('/page-1/sub-page-1/')` will return\n    `page-1/sub-page-1`\n    ```\n    \"\"\"\n    return app_strip_relative_path(CONFIG.requests_pathname_prefix, path)\n\n\ndef app_strip_relative_path(requests_pathname, path):\n    if path is None:\n        return None\n    if (\n        requests_pathname != \"/\" and not path.startswith(requests_pathname.rstrip(\"/\"))\n    ) or (requests_pathname == \"/\" and not path.startswith(\"/\")):\n        raise exceptions.UnsupportedRelativePath(\n            f\"\"\"\n            Paths that aren't prefixed with requests_pathname_prefix are not supported.\n            You supplied: {path} and requests_pathname_prefix was {requests_pathname}\n            \"\"\"\n        )\n    if requests_pathname != \"/\" and path.startswith(requests_pathname.rstrip(\"/\")):\n        path = path.replace(\n            # handle the case where the path might be `/my-dash-app`\n            # but the requests_pathname_prefix is `/my-dash-app/`\n            requests_pathname.rstrip(\"/\"),\n            \"\",\n            1,\n        )\n    return path.strip(\"/\")\n", "path": "dash/_get_paths.py"}], "after_files": [{"content": "from ._utils import AttributeDict\nfrom . import exceptions\n\nCONFIG = AttributeDict()\n\n\ndef get_asset_url(path):\n    return app_get_asset_url(CONFIG, path)\n\n\ndef app_get_asset_url(config, path):\n    if config.assets_external_path:\n        prefix = config.assets_external_path\n    else:\n        prefix = config.requests_pathname_prefix\n    return \"/\".join(\n        [\n            # Only take the first part of the pathname\n            prefix.rstrip(\"/\"),\n            config.assets_url_path.lstrip(\"/\"),\n            path,\n        ]\n    )\n\n\ndef get_relative_path(path):\n    \"\"\"\n    Return a path with `requests_pathname_prefix` prefixed before it.\n    Use this function when specifying local URL paths that will work\n    in environments regardless of what `requests_pathname_prefix` is.\n    In some deployment environments, like Dash Enterprise,\n    `requests_pathname_prefix` is set to the application name,\n    e.g. `my-dash-app`.\n    When working locally, `requests_pathname_prefix` might be unset and\n    so a relative URL like `/page-2` can just be `/page-2`.\n    However, when the app is deployed to a URL like `/my-dash-app`, then\n    `dash.get_relative_path('/page-2')` will return `/my-dash-app/page-2`.\n    This can be used as an alternative to `get_asset_url` as well with\n    `dash.get_relative_path('/assets/logo.png')`\n\n    Use this function with `dash.strip_relative_path` in callbacks that\n    deal with `dcc.Location` `pathname` routing.\n    That is, your usage may look like:\n    ```\n    app.layout = html.Div([\n        dcc.Location(id='url'),\n        html.Div(id='content')\n    ])\n    @dash.callback(Output('content', 'children'), [Input('url', 'pathname')])\n    def display_content(path):\n        page_name = dash.strip_relative_path(path)\n        if not page_name:  # None or ''\n            return html.Div([\n                dcc.Link(href=dash.get_relative_path('/page-1')),\n                dcc.Link(href=dash.get_relative_path('/page-2')),\n            ])\n        elif page_name == 'page-1':\n            return chapters.page_1\n        if page_name == \"page-2\":\n            return chapters.page_2\n    ```\n    \"\"\"\n    return app_get_relative_path(CONFIG.requests_pathname_prefix, path)\n\n\ndef app_get_relative_path(requests_pathname, path):\n    if requests_pathname == \"/\" and path == \"\":\n        return \"/\"\n    if requests_pathname != \"/\" and path == \"\":\n        return requests_pathname\n    if not path.startswith(\"/\"):\n        raise exceptions.UnsupportedRelativePath(\n            f\"\"\"\n            Paths that aren't prefixed with a leading / are not supported.\n            You supplied: {path}\n            \"\"\"\n        )\n    return \"/\".join([requests_pathname.rstrip(\"/\"), path.lstrip(\"/\")])\n\n\ndef strip_relative_path(path):\n    \"\"\"\n    Return a path with `requests_pathname_prefix` and leading and trailing\n    slashes stripped from it. Also, if None is passed in, None is returned.\n    Use this function with `get_relative_path` in callbacks that deal\n    with `dcc.Location` `pathname` routing.\n    That is, your usage may look like:\n    ```\n    app.layout = html.Div([\n        dcc.Location(id='url'),\n        html.Div(id='content')\n    ])\n    @dash.callback(Output('content', 'children'), [Input('url', 'pathname')])\n    def display_content(path):\n        page_name = dash.strip_relative_path(path)\n        if not page_name:  # None or ''\n            return html.Div([\n                dcc.Link(href=dash.get_relative_path('/page-1')),\n                dcc.Link(href=dash.get_relative_path('/page-2')),\n            ])\n        elif page_name == 'page-1':\n            return chapters.page_1\n        if page_name == \"page-2\":\n            return chapters.page_2\n    ```\n    Note that `chapters.page_1` will be served if the user visits `/page-1`\n    _or_ `/page-1/` since `strip_relative_path` removes the trailing slash.\n\n    Also note that `strip_relative_path` is compatible with\n    `get_relative_path` in environments where `requests_pathname_prefix` set.\n    In some deployment environments, like Dash Enterprise,\n    `requests_pathname_prefix` is set to the application name, e.g. `my-dash-app`.\n    When working locally, `requests_pathname_prefix` might be unset and\n    so a relative URL like `/page-2` can just be `/page-2`.\n    However, when the app is deployed to a URL like `/my-dash-app`, then\n    `dash.get_relative_path('/page-2')` will return `/my-dash-app/page-2`\n\n    The `pathname` property of `dcc.Location` will return '`/my-dash-app/page-2`'\n    to the callback.\n    In this case, `dash.strip_relative_path('/my-dash-app/page-2')`\n    will return `'page-2'`\n\n    For nested URLs, slashes are still included:\n    `dash.strip_relative_path('/page-1/sub-page-1/')` will return\n    `page-1/sub-page-1`\n    ```\n    \"\"\"\n    return app_strip_relative_path(CONFIG.requests_pathname_prefix, path)\n\n\ndef app_strip_relative_path(requests_pathname, path):\n    if path is None:\n        return None\n    if (\n        requests_pathname != \"/\" and not path.startswith(requests_pathname.rstrip(\"/\"))\n    ) or (requests_pathname == \"/\" and not path.startswith(\"/\")):\n        raise exceptions.UnsupportedRelativePath(\n            f\"\"\"\n            Paths that aren't prefixed with requests_pathname_prefix are not supported.\n            You supplied: {path} and requests_pathname_prefix was {requests_pathname}\n            \"\"\"\n        )\n    if requests_pathname != \"/\" and path.startswith(requests_pathname.rstrip(\"/\")):\n        path = path.replace(\n            # handle the case where the path might be `/my-dash-app`\n            # but the requests_pathname_prefix is `/my-dash-app/`\n            requests_pathname.rstrip(\"/\"),\n            \"\",\n            1,\n        )\n    return path.strip(\"/\")\n", "path": "dash/_get_paths.py"}]}