We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Infra: Allow dismissing the historical note banner
These notes take up more than a 1/3 of my screen and make it significantly harder to read the PEP. I can developer console it out of existence on my laptop, but not on my phone.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py`
Content:
```
1 """Roles to insert custom admonitions pointing readers to canonical content."""
2 
3 from __future__ import annotations
4 
5 from docutils import nodes
6 from docutils.parsers import rst
7 
8 PYPA_SPEC_BASE_URL = "https://packaging.python.org/en/latest/specifications/"
9 
10 
11 class PEPBanner(rst.Directive):
12     """Insert a special banner admonition in a PEP document."""
13 
14     has_content = True
15     required_arguments = 0
16     optional_arguments = 1
17     final_argument_whitespace = True
18     option_spec = {}
19 
20     admonition_pre_template = ""
21     admonition_pre_text = ""
22     admonition_post_text = ""
23 
24     admonition_class = nodes.important
25     css_classes = []
26 
27 
28     def run(self) -> list[nodes.admonition]:
29 
30         if self.arguments:
31             link_content = self.arguments[0]
32             pre_text = self.admonition_pre_template.format(
33                 link_content=link_content)
34         else:
35             pre_text = self.admonition_pre_text
36 
37         pre_text_node = nodes.paragraph(pre_text)
38         pre_text_node.line = self.lineno
39         pre_node, pre_msg = self.state.inline_text(pre_text, self.lineno)
40         pre_text_node.extend(pre_node + pre_msg)
41 
42         post_text = self.admonition_post_text
43         post_text_node = nodes.paragraph(post_text)
44         post_text_node.line = self.lineno
45         post_node, post_msg = self.state.inline_text(post_text, self.lineno)
46         post_text_node.extend(post_node + post_msg)
47 
48         source_lines = [pre_text] + list(self.content or []) + [post_text]
49         admonition_node = self.admonition_class(
50             "\n".join(source_lines), classes=["pep-banner"] + self.css_classes)
51 
52         admonition_node.append(pre_text_node)
53         if self.content:
54             self.state.nested_parse(
55                 self.content, self.content_offset, admonition_node)
56         admonition_node.append(post_text_node)
57 
58         return [admonition_node]
59 
60 
61 class CanonicalDocBanner(PEPBanner):
62     """Insert an admonition pointing readers to a PEP's canonical docs."""
63 
64     admonition_pre_template = (
65         "This PEP is a historical document. "
66         "The up-to-date, canonical documentation can now be found "
67         "at {link_content}."
68     )
69     admonition_pre_text = (
70         "This PEP is a historical document. "
71         "The up-to-date, canonical documentation can now be found elsewhere."
72     )
73     admonition_post_text = (
74         "See :pep:`1` for how to propose changes."
75     )
76 
77     css_classes = ["canonical-doc", "sticky-banner"]
78 
79 
80 
81 class CanonicalPyPASpecBanner(PEPBanner):
82     """Insert a specialized admonition for PyPA packaging specifications."""
83 
84     admonition_pre_template = (
85         "This PEP is a historical document. "
86         "The up-to-date, canonical spec, {link_content}, is maintained on "
87         f"the `PyPA specs page <{PYPA_SPEC_BASE_URL}>`__."
88     )
89     admonition_pre_text = (
90         "This PEP is a historical document. "
91         "The up-to-date, canonical specifications are maintained on "
92         f"the `PyPA specs page <{PYPA_SPEC_BASE_URL}>`__."
93     )
94     admonition_post_text = (
95         "See the `PyPA specification update process "
96         "<https://www.pypa.io/en/latest/specifications/#handling-fixes-and-other-minor-updates>`__ "
97         "for how to propose changes."
98     )
99     admonition_class = nodes.attention
100 
101     css_classes = ["canonical-pypa-spec", "sticky-banner"]
102
```
--- 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/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py
--- a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py
+++ b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py
@@ -34,6 +34,9 @@
         else:
             pre_text = self.admonition_pre_text
 
+        close_button_node = nodes.paragraph('', '', nodes.Text('×'), classes=['close-button'])
+        close_button_node['classes'].append('close-button')
+
         pre_text_node = nodes.paragraph(pre_text)
         pre_text_node.line = self.lineno
         pre_node, pre_msg = self.state.inline_text(pre_text, self.lineno)
@@ -50,6 +53,7 @@
             "\n".join(source_lines), classes=["pep-banner"] + self.css_classes)
 
         admonition_node.append(pre_text_node)
+        admonition_node.append(close_button_node)
         if self.content:
             self.state.nested_parse(
                 self.content, self.content_offset, admonition_node)

{"golden_diff": "diff --git a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py\n--- a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py\n+++ b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py\n@@ -34,6 +34,9 @@\n         else:\n             pre_text = self.admonition_pre_text\n \n+        close_button_node = nodes.paragraph('', '', nodes.Text('\u00d7'), classes=['close-button'])\n+        close_button_node['classes'].append('close-button')\n+\n         pre_text_node = nodes.paragraph(pre_text)\n         pre_text_node.line = self.lineno\n         pre_node, pre_msg = self.state.inline_text(pre_text, self.lineno)\n@@ -50,6 +53,7 @@\n             \"\\n\".join(source_lines), classes=[\"pep-banner\"] + self.css_classes)\n \n         admonition_node.append(pre_text_node)\n+        admonition_node.append(close_button_node)\n         if self.content:\n             self.state.nested_parse(\n                 self.content, self.content_offset, admonition_node)\n", "issue": "Infra: Allow dismissing the historical note banner\nThese notes take up more than a 1/3 of my screen and make it significantly harder to read the PEP. I can developer console it out of existence on my laptop, but not on my phone.\n", "before_files": [{"content": "\"\"\"Roles to insert custom admonitions pointing readers to canonical content.\"\"\"\n\nfrom __future__ import annotations\n\nfrom docutils import nodes\nfrom docutils.parsers import rst\n\nPYPA_SPEC_BASE_URL = \"https://packaging.python.org/en/latest/specifications/\"\n\n\nclass PEPBanner(rst.Directive):\n    \"\"\"Insert a special banner admonition in a PEP document.\"\"\"\n\n    has_content = True\n    required_arguments = 0\n    optional_arguments = 1\n    final_argument_whitespace = True\n    option_spec = {}\n\n    admonition_pre_template = \"\"\n    admonition_pre_text = \"\"\n    admonition_post_text = \"\"\n\n    admonition_class = nodes.important\n    css_classes = []\n\n\n    def run(self) -> list[nodes.admonition]:\n\n        if self.arguments:\n            link_content = self.arguments[0]\n            pre_text = self.admonition_pre_template.format(\n                link_content=link_content)\n        else:\n            pre_text = self.admonition_pre_text\n\n        pre_text_node = nodes.paragraph(pre_text)\n        pre_text_node.line = self.lineno\n        pre_node, pre_msg = self.state.inline_text(pre_text, self.lineno)\n        pre_text_node.extend(pre_node + pre_msg)\n\n        post_text = self.admonition_post_text\n        post_text_node = nodes.paragraph(post_text)\n        post_text_node.line = self.lineno\n        post_node, post_msg = self.state.inline_text(post_text, self.lineno)\n        post_text_node.extend(post_node + post_msg)\n\n        source_lines = [pre_text] + list(self.content or []) + [post_text]\n        admonition_node = self.admonition_class(\n            \"\\n\".join(source_lines), classes=[\"pep-banner\"] + self.css_classes)\n\n        admonition_node.append(pre_text_node)\n        if self.content:\n            self.state.nested_parse(\n                self.content, self.content_offset, admonition_node)\n        admonition_node.append(post_text_node)\n\n        return [admonition_node]\n\n\nclass CanonicalDocBanner(PEPBanner):\n    \"\"\"Insert an admonition pointing readers to a PEP's canonical docs.\"\"\"\n\n    admonition_pre_template = (\n        \"This PEP is a historical document. \"\n        \"The up-to-date, canonical documentation can now be found \"\n        \"at {link_content}.\"\n    )\n    admonition_pre_text = (\n        \"This PEP is a historical document. \"\n        \"The up-to-date, canonical documentation can now be found elsewhere.\"\n    )\n    admonition_post_text = (\n        \"See :pep:`1` for how to propose changes.\"\n    )\n\n    css_classes = [\"canonical-doc\", \"sticky-banner\"]\n\n\n\nclass CanonicalPyPASpecBanner(PEPBanner):\n    \"\"\"Insert a specialized admonition for PyPA packaging specifications.\"\"\"\n\n    admonition_pre_template = (\n        \"This PEP is a historical document. \"\n        \"The up-to-date, canonical spec, {link_content}, is maintained on \"\n        f\"the `PyPA specs page <{PYPA_SPEC_BASE_URL}>`__.\"\n    )\n    admonition_pre_text = (\n        \"This PEP is a historical document. \"\n        \"The up-to-date, canonical specifications are maintained on \"\n        f\"the `PyPA specs page <{PYPA_SPEC_BASE_URL}>`__.\"\n    )\n    admonition_post_text = (\n        \"See the `PyPA specification update process \"\n        \"<https://www.pypa.io/en/latest/specifications/#handling-fixes-and-other-minor-updates>`__ \"\n        \"for how to propose changes.\"\n    )\n    admonition_class = nodes.attention\n\n    css_classes = [\"canonical-pypa-spec\", \"sticky-banner\"]\n", "path": "pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py"}], "after_files": [{"content": "\"\"\"Roles to insert custom admonitions pointing readers to canonical content.\"\"\"\n\nfrom __future__ import annotations\n\nfrom docutils import nodes\nfrom docutils.parsers import rst\n\nPYPA_SPEC_BASE_URL = \"https://packaging.python.org/en/latest/specifications/\"\n\n\nclass PEPBanner(rst.Directive):\n    \"\"\"Insert a special banner admonition in a PEP document.\"\"\"\n\n    has_content = True\n    required_arguments = 0\n    optional_arguments = 1\n    final_argument_whitespace = True\n    option_spec = {}\n\n    admonition_pre_template = \"\"\n    admonition_pre_text = \"\"\n    admonition_post_text = \"\"\n\n    admonition_class = nodes.important\n    css_classes = []\n\n\n    def run(self) -> list[nodes.admonition]:\n\n        if self.arguments:\n            link_content = self.arguments[0]\n            pre_text = self.admonition_pre_template.format(\n                link_content=link_content)\n        else:\n            pre_text = self.admonition_pre_text\n\n        close_button_node = nodes.paragraph('', '', nodes.Text('\u00d7'), classes=['close-button'])\n        close_button_node['classes'].append('close-button')\n\n        pre_text_node = nodes.paragraph(pre_text)\n        pre_text_node.line = self.lineno\n        pre_node, pre_msg = self.state.inline_text(pre_text, self.lineno)\n        pre_text_node.extend(pre_node + pre_msg)\n\n        post_text = self.admonition_post_text\n        post_text_node = nodes.paragraph(post_text)\n        post_text_node.line = self.lineno\n        post_node, post_msg = self.state.inline_text(post_text, self.lineno)\n        post_text_node.extend(post_node + post_msg)\n\n        source_lines = [pre_text] + list(self.content or []) + [post_text]\n        admonition_node = self.admonition_class(\n            \"\\n\".join(source_lines), classes=[\"pep-banner\"] + self.css_classes)\n\n        admonition_node.append(pre_text_node)\n        admonition_node.append(close_button_node)\n        if self.content:\n            self.state.nested_parse(\n                self.content, self.content_offset, admonition_node)\n        admonition_node.append(post_text_node)\n\n        return [admonition_node]\n\n\nclass CanonicalDocBanner(PEPBanner):\n    \"\"\"Insert an admonition pointing readers to a PEP's canonical docs.\"\"\"\n\n    admonition_pre_template = (\n        \"This PEP is a historical document. \"\n        \"The up-to-date, canonical documentation can now be found \"\n        \"at {link_content}.\"\n    )\n    admonition_pre_text = (\n        \"This PEP is a historical document. \"\n        \"The up-to-date, canonical documentation can now be found elsewhere.\"\n    )\n    admonition_post_text = (\n        \"See :pep:`1` for how to propose changes.\"\n    )\n\n    css_classes = [\"canonical-doc\", \"sticky-banner\"]\n\n\n\nclass CanonicalPyPASpecBanner(PEPBanner):\n    \"\"\"Insert a specialized admonition for PyPA packaging specifications.\"\"\"\n\n    admonition_pre_template = (\n        \"This PEP is a historical document. \"\n        \"The up-to-date, canonical spec, {link_content}, is maintained on \"\n        f\"the `PyPA specs page <{PYPA_SPEC_BASE_URL}>`__.\"\n    )\n    admonition_pre_text = (\n        \"This PEP is a historical document. \"\n        \"The up-to-date, canonical specifications are maintained on \"\n        f\"the `PyPA specs page <{PYPA_SPEC_BASE_URL}>`__.\"\n    )\n    admonition_post_text = (\n        \"See the `PyPA specification update process \"\n        \"<https://www.pypa.io/en/latest/specifications/#handling-fixes-and-other-minor-updates>`__ \"\n        \"for how to propose changes.\"\n    )\n    admonition_class = nodes.attention\n\n    css_classes = [\"canonical-pypa-spec\", \"sticky-banner\"]\n", "path": "pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py"}]}