We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ProfilerMiddleware Missing in Latest Release
### Environment

```
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.4
BuildVersion:	18E226

$ python --version
Python 3.7.3

$ pip freeze
Werkzeug==0.15.2
```

### Observed Behavior
Inability to import the ProfilerMiddleware from werkzeug as described in [the documentation](https://werkzeug.palletsprojects.com/en/0.15.x/middleware/profiler/)

```
>>> from werkzeug.middleware.profile import ProfilerMiddleware
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'werkzeug.middleware.profile'
```

### Steps to Reproduce
```
[~/git] $ mkdir test_venv
[~/git] $ cd test_venv/
[~/git/test_venv] $ python3 -m venv venv
[~/git/test_venv] $ source venv/bin/activate
(venv) [~/git/test_venv] $ pip --version
pip 19.0.3 from /Users/cchapline/git/test_venv/venv/lib/python3.7/site-packages/pip (python 3.7)
(venv) [~/git/test_venv] $ pip install werkzeug
Collecting werkzeug
  Using cached https://files.pythonhosted.org/packages/18/79/84f02539cc181cdbf5ff5a41b9f52cae870b6f632767e43ba6ac70132e92/Werkzeug-0.15.2-py2.py3-none-any.whl
Installing collected packages: werkzeug
Successfully installed werkzeug-0.15.2
(venv) [~/git/test_venv] $ python
Python 3.7.3 (default, Apr  4 2019, 10:56:22)
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from werkzeug.middleware.profile import ProfilerMiddleware
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'werkzeug.middleware.profile'
>>> import werkzeug.middleware as mw
>>> dir(mw)
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'dispatcher', 'http_proxy', 'shared_data']
```

### Expected Behavior

The `ImportError` should not occur as I can see the code in `site-packages`:

```
(venv) [~/git/test_venv] $ ls venv/lib/python3.7/site-packages/werkzeug/middleware/profiler.py
venv/lib/python3.7/site-packages/werkzeug/middleware/profiler.py
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/werkzeug/middleware/profiler.py`
Content:
```
1 """
2 Application Profiler
3 ====================
4 
5 This module provides a middleware that profiles each request with the
6 :mod:`cProfile` module. This can help identify bottlenecks in your code
7 that may be slowing down your application.
8 
9 .. autoclass:: ProfilerMiddleware
10 
11 :copyright: 2007 Pallets
12 :license: BSD-3-Clause
13 """
14 from __future__ import print_function
15 
16 import os.path
17 import sys
18 import time
19 from pstats import Stats
20 
21 try:
22     from cProfile import Profile
23 except ImportError:
24     from profile import Profile
25 
26 
27 class ProfilerMiddleware(object):
28     """Wrap a WSGI application and profile the execution of each
29     request. Responses are buffered so that timings are more exact.
30 
31     If ``stream`` is given, :class:`pstats.Stats` are written to it
32     after each request. If ``profile_dir`` is given, :mod:`cProfile`
33     data files are saved to that directory, one file per request.
34 
35     The filename can be customized by passing ``filename_format``. If
36     it is a string, it will be formatted using :meth:`str.format` with
37     the following fields available:
38 
39     -   ``{method}`` - The request method; GET, POST, etc.
40     -   ``{path}`` - The request path or 'root' should one not exist.
41     -   ``{elapsed}`` - The elapsed time of the request.
42     -   ``{time}`` - The time of the request.
43 
44     If it is a callable, it will be called with the WSGI ``environ``
45     dict and should return a filename.
46 
47     :param app: The WSGI application to wrap.
48     :param stream: Write stats to this stream. Disable with ``None``.
49     :param sort_by: A tuple of columns to sort stats by. See
50         :meth:`pstats.Stats.sort_stats`.
51     :param restrictions: A tuple of restrictions to filter stats by. See
52         :meth:`pstats.Stats.print_stats`.
53     :param profile_dir: Save profile data files to this directory.
54     :param filename_format: Format string for profile data file names,
55         or a callable returning a name. See explanation above.
56 
57     .. code-block:: python
58 
59         from werkzeug.middleware.profile import ProfilerMiddleware
60         app = ProfilerMiddleware(app)
61 
62     .. versionchanged:: 0.15
63         Stats are written even if ``profile_dir`` is given, and can be
64         disable by passing ``stream=None``.
65 
66     .. versionadded:: 0.15
67         Added ``filename_format``.
68 
69     .. versionadded:: 0.9
70         Added ``restrictions`` and ``profile_dir``.
71     """
72 
73     def __init__(
74         self,
75         app,
76         stream=sys.stdout,
77         sort_by=("time", "calls"),
78         restrictions=(),
79         profile_dir=None,
80         filename_format="{method}.{path}.{elapsed:06d}ms.{time:d}.prof",
81     ):
82         self._app = app
83         self._stream = stream
84         self._sort_by = sort_by
85         self._restrictions = restrictions
86         self._profile_dir = profile_dir
87         self._filename_format = filename_format
88 
89     def __call__(self, environ, start_response):
90         response_body = []
91 
92         def catching_start_response(status, headers, exc_info=None):
93             start_response(status, headers, exc_info)
94             return response_body.append
95 
96         def runapp():
97             app_iter = self._app(environ, catching_start_response)
98             response_body.extend(app_iter)
99 
100             if hasattr(app_iter, "close"):
101                 app_iter.close()
102 
103         profile = Profile()
104         start = time.time()
105         profile.runcall(runapp)
106         body = b"".join(response_body)
107         elapsed = time.time() - start
108 
109         if self._profile_dir is not None:
110             if callable(self._filename_format):
111                 filename = self._filename_format(environ)
112             else:
113                 filename = self._filename_format.format(
114                     method=environ["REQUEST_METHOD"],
115                     path=(
116                         environ.get("PATH_INFO").strip("/").replace("/", ".") or "root"
117                     ),
118                     elapsed=elapsed * 1000.0,
119                     time=time.time(),
120                 )
121             filename = os.path.join(self._profile_dir, filename)
122             profile.dump_stats(filename)
123 
124         if self._stream is not None:
125             stats = Stats(profile, stream=self._stream)
126             stats.sort_stats(*self._sort_by)
127             print("-" * 80, file=self._stream)
128             print("PATH: {!r}".format(environ.get("PATH_INFO", "")), file=self._stream)
129             stats.print_stats(*self._restrictions)
130             print("-" * 80 + "\n", file=self._stream)
131 
132         return [body]
133
```
--- 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/src/werkzeug/middleware/profiler.py b/src/werkzeug/middleware/profiler.py
--- a/src/werkzeug/middleware/profiler.py
+++ b/src/werkzeug/middleware/profiler.py
@@ -56,7 +56,7 @@
 
     .. code-block:: python
 
-        from werkzeug.middleware.profile import ProfilerMiddleware
+        from werkzeug.middleware.profiler import ProfilerMiddleware
         app = ProfilerMiddleware(app)
 
     .. versionchanged:: 0.15

{"golden_diff": "diff --git a/src/werkzeug/middleware/profiler.py b/src/werkzeug/middleware/profiler.py\n--- a/src/werkzeug/middleware/profiler.py\n+++ b/src/werkzeug/middleware/profiler.py\n@@ -56,7 +56,7 @@\n \n     .. code-block:: python\n \n-        from werkzeug.middleware.profile import ProfilerMiddleware\n+        from werkzeug.middleware.profiler import ProfilerMiddleware\n         app = ProfilerMiddleware(app)\n \n     .. versionchanged:: 0.15\n", "issue": "ProfilerMiddleware Missing in Latest Release\n### Environment\r\n\r\n```\r\n$ sw_vers\r\nProductName:\tMac OS X\r\nProductVersion:\t10.14.4\r\nBuildVersion:\t18E226\r\n\r\n$ python --version\r\nPython 3.7.3\r\n\r\n$ pip freeze\r\nWerkzeug==0.15.2\r\n```\r\n\r\n### Observed Behavior\r\nInability to import the ProfilerMiddleware from werkzeug as described in [the documentation](https://werkzeug.palletsprojects.com/en/0.15.x/middleware/profiler/)\r\n\r\n```\r\n>>> from werkzeug.middleware.profile import ProfilerMiddleware\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nModuleNotFoundError: No module named 'werkzeug.middleware.profile'\r\n```\r\n\r\n### Steps to Reproduce\r\n```\r\n[~/git] $ mkdir test_venv\r\n[~/git] $ cd test_venv/\r\n[~/git/test_venv] $ python3 -m venv venv\r\n[~/git/test_venv] $ source venv/bin/activate\r\n(venv) [~/git/test_venv] $ pip --version\r\npip 19.0.3 from /Users/cchapline/git/test_venv/venv/lib/python3.7/site-packages/pip (python 3.7)\r\n(venv) [~/git/test_venv] $ pip install werkzeug\r\nCollecting werkzeug\r\n  Using cached https://files.pythonhosted.org/packages/18/79/84f02539cc181cdbf5ff5a41b9f52cae870b6f632767e43ba6ac70132e92/Werkzeug-0.15.2-py2.py3-none-any.whl\r\nInstalling collected packages: werkzeug\r\nSuccessfully installed werkzeug-0.15.2\r\n(venv) [~/git/test_venv] $ python\r\nPython 3.7.3 (default, Apr  4 2019, 10:56:22)\r\n[Clang 10.0.1 (clang-1001.0.46.3)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> from werkzeug.middleware.profile import ProfilerMiddleware\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nModuleNotFoundError: No module named 'werkzeug.middleware.profile'\r\n>>> import werkzeug.middleware as mw\r\n>>> dir(mw)\r\n['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'dispatcher', 'http_proxy', 'shared_data']\r\n```\r\n\r\n### Expected Behavior\r\n\r\nThe `ImportError` should not occur as I can see the code in `site-packages`:\r\n\r\n```\r\n(venv) [~/git/test_venv] $ ls venv/lib/python3.7/site-packages/werkzeug/middleware/profiler.py\r\nvenv/lib/python3.7/site-packages/werkzeug/middleware/profiler.py\r\n```\n", "before_files": [{"content": "\"\"\"\nApplication Profiler\n====================\n\nThis module provides a middleware that profiles each request with the\n:mod:`cProfile` module. This can help identify bottlenecks in your code\nthat may be slowing down your application.\n\n.. autoclass:: ProfilerMiddleware\n\n:copyright: 2007 Pallets\n:license: BSD-3-Clause\n\"\"\"\nfrom __future__ import print_function\n\nimport os.path\nimport sys\nimport time\nfrom pstats import Stats\n\ntry:\n    from cProfile import Profile\nexcept ImportError:\n    from profile import Profile\n\n\nclass ProfilerMiddleware(object):\n    \"\"\"Wrap a WSGI application and profile the execution of each\n    request. Responses are buffered so that timings are more exact.\n\n    If ``stream`` is given, :class:`pstats.Stats` are written to it\n    after each request. If ``profile_dir`` is given, :mod:`cProfile`\n    data files are saved to that directory, one file per request.\n\n    The filename can be customized by passing ``filename_format``. If\n    it is a string, it will be formatted using :meth:`str.format` with\n    the following fields available:\n\n    -   ``{method}`` - The request method; GET, POST, etc.\n    -   ``{path}`` - The request path or 'root' should one not exist.\n    -   ``{elapsed}`` - The elapsed time of the request.\n    -   ``{time}`` - The time of the request.\n\n    If it is a callable, it will be called with the WSGI ``environ``\n    dict and should return a filename.\n\n    :param app: The WSGI application to wrap.\n    :param stream: Write stats to this stream. Disable with ``None``.\n    :param sort_by: A tuple of columns to sort stats by. See\n        :meth:`pstats.Stats.sort_stats`.\n    :param restrictions: A tuple of restrictions to filter stats by. See\n        :meth:`pstats.Stats.print_stats`.\n    :param profile_dir: Save profile data files to this directory.\n    :param filename_format: Format string for profile data file names,\n        or a callable returning a name. See explanation above.\n\n    .. code-block:: python\n\n        from werkzeug.middleware.profile import ProfilerMiddleware\n        app = ProfilerMiddleware(app)\n\n    .. versionchanged:: 0.15\n        Stats are written even if ``profile_dir`` is given, and can be\n        disable by passing ``stream=None``.\n\n    .. versionadded:: 0.15\n        Added ``filename_format``.\n\n    .. versionadded:: 0.9\n        Added ``restrictions`` and ``profile_dir``.\n    \"\"\"\n\n    def __init__(\n        self,\n        app,\n        stream=sys.stdout,\n        sort_by=(\"time\", \"calls\"),\n        restrictions=(),\n        profile_dir=None,\n        filename_format=\"{method}.{path}.{elapsed:06d}ms.{time:d}.prof\",\n    ):\n        self._app = app\n        self._stream = stream\n        self._sort_by = sort_by\n        self._restrictions = restrictions\n        self._profile_dir = profile_dir\n        self._filename_format = filename_format\n\n    def __call__(self, environ, start_response):\n        response_body = []\n\n        def catching_start_response(status, headers, exc_info=None):\n            start_response(status, headers, exc_info)\n            return response_body.append\n\n        def runapp():\n            app_iter = self._app(environ, catching_start_response)\n            response_body.extend(app_iter)\n\n            if hasattr(app_iter, \"close\"):\n                app_iter.close()\n\n        profile = Profile()\n        start = time.time()\n        profile.runcall(runapp)\n        body = b\"\".join(response_body)\n        elapsed = time.time() - start\n\n        if self._profile_dir is not None:\n            if callable(self._filename_format):\n                filename = self._filename_format(environ)\n            else:\n                filename = self._filename_format.format(\n                    method=environ[\"REQUEST_METHOD\"],\n                    path=(\n                        environ.get(\"PATH_INFO\").strip(\"/\").replace(\"/\", \".\") or \"root\"\n                    ),\n                    elapsed=elapsed * 1000.0,\n                    time=time.time(),\n                )\n            filename = os.path.join(self._profile_dir, filename)\n            profile.dump_stats(filename)\n\n        if self._stream is not None:\n            stats = Stats(profile, stream=self._stream)\n            stats.sort_stats(*self._sort_by)\n            print(\"-\" * 80, file=self._stream)\n            print(\"PATH: {!r}\".format(environ.get(\"PATH_INFO\", \"\")), file=self._stream)\n            stats.print_stats(*self._restrictions)\n            print(\"-\" * 80 + \"\\n\", file=self._stream)\n\n        return [body]\n", "path": "src/werkzeug/middleware/profiler.py"}], "after_files": [{"content": "\"\"\"\nApplication Profiler\n====================\n\nThis module provides a middleware that profiles each request with the\n:mod:`cProfile` module. This can help identify bottlenecks in your code\nthat may be slowing down your application.\n\n.. autoclass:: ProfilerMiddleware\n\n:copyright: 2007 Pallets\n:license: BSD-3-Clause\n\"\"\"\nfrom __future__ import print_function\n\nimport os.path\nimport sys\nimport time\nfrom pstats import Stats\n\ntry:\n    from cProfile import Profile\nexcept ImportError:\n    from profile import Profile\n\n\nclass ProfilerMiddleware(object):\n    \"\"\"Wrap a WSGI application and profile the execution of each\n    request. Responses are buffered so that timings are more exact.\n\n    If ``stream`` is given, :class:`pstats.Stats` are written to it\n    after each request. If ``profile_dir`` is given, :mod:`cProfile`\n    data files are saved to that directory, one file per request.\n\n    The filename can be customized by passing ``filename_format``. If\n    it is a string, it will be formatted using :meth:`str.format` with\n    the following fields available:\n\n    -   ``{method}`` - The request method; GET, POST, etc.\n    -   ``{path}`` - The request path or 'root' should one not exist.\n    -   ``{elapsed}`` - The elapsed time of the request.\n    -   ``{time}`` - The time of the request.\n\n    If it is a callable, it will be called with the WSGI ``environ``\n    dict and should return a filename.\n\n    :param app: The WSGI application to wrap.\n    :param stream: Write stats to this stream. Disable with ``None``.\n    :param sort_by: A tuple of columns to sort stats by. See\n        :meth:`pstats.Stats.sort_stats`.\n    :param restrictions: A tuple of restrictions to filter stats by. See\n        :meth:`pstats.Stats.print_stats`.\n    :param profile_dir: Save profile data files to this directory.\n    :param filename_format: Format string for profile data file names,\n        or a callable returning a name. See explanation above.\n\n    .. code-block:: python\n\n        from werkzeug.middleware.profiler import ProfilerMiddleware\n        app = ProfilerMiddleware(app)\n\n    .. versionchanged:: 0.15\n        Stats are written even if ``profile_dir`` is given, and can be\n        disable by passing ``stream=None``.\n\n    .. versionadded:: 0.15\n        Added ``filename_format``.\n\n    .. versionadded:: 0.9\n        Added ``restrictions`` and ``profile_dir``.\n    \"\"\"\n\n    def __init__(\n        self,\n        app,\n        stream=sys.stdout,\n        sort_by=(\"time\", \"calls\"),\n        restrictions=(),\n        profile_dir=None,\n        filename_format=\"{method}.{path}.{elapsed:06d}ms.{time:d}.prof\",\n    ):\n        self._app = app\n        self._stream = stream\n        self._sort_by = sort_by\n        self._restrictions = restrictions\n        self._profile_dir = profile_dir\n        self._filename_format = filename_format\n\n    def __call__(self, environ, start_response):\n        response_body = []\n\n        def catching_start_response(status, headers, exc_info=None):\n            start_response(status, headers, exc_info)\n            return response_body.append\n\n        def runapp():\n            app_iter = self._app(environ, catching_start_response)\n            response_body.extend(app_iter)\n\n            if hasattr(app_iter, \"close\"):\n                app_iter.close()\n\n        profile = Profile()\n        start = time.time()\n        profile.runcall(runapp)\n        body = b\"\".join(response_body)\n        elapsed = time.time() - start\n\n        if self._profile_dir is not None:\n            if callable(self._filename_format):\n                filename = self._filename_format(environ)\n            else:\n                filename = self._filename_format.format(\n                    method=environ[\"REQUEST_METHOD\"],\n                    path=(\n                        environ.get(\"PATH_INFO\").strip(\"/\").replace(\"/\", \".\") or \"root\"\n                    ),\n                    elapsed=elapsed * 1000.0,\n                    time=time.time(),\n                )\n            filename = os.path.join(self._profile_dir, filename)\n            profile.dump_stats(filename)\n\n        if self._stream is not None:\n            stats = Stats(profile, stream=self._stream)\n            stats.sort_stats(*self._sort_by)\n            print(\"-\" * 80, file=self._stream)\n            print(\"PATH: {!r}\".format(environ.get(\"PATH_INFO\", \"\")), file=self._stream)\n            stats.print_stats(*self._restrictions)\n            print(\"-\" * 80 + \"\\n\", file=self._stream)\n\n        return [body]\n", "path": "src/werkzeug/middleware/profiler.py"}]}