We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add binder links to generated example notebooks
Stumbled upon at #638 

* Binder is a cool tool I'd love to learn more about
* https://sphinx-gallery.github.io/configuration.html#binder-links is pretty cool
	* https://github.com/mne-tools/mne-bids/pull/207/files is an implementation

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/conf.py`
Content:
```
1 #!/usr/bin/env python3.6
2 # -*- coding: utf-8 -*-
3 #
4 # PlasmaPy documentation build configuration file, created by
5 # sphinx-quickstart on Wed May 31 18:16:46 2017.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing dir.
9 #
10 # Note that not all possible configuration values are present in this
11 # autogenerated file.
12 #
13 # All configuration values have a default; values that are commented out
14 # serve to show the default.
15 
16 # If extensions (or modules to document with autodoc) are in another directory,
17 # add these directories to sys.path here. If the directory is relative to the
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 #
20 
21 import os
22 import sys
23 
24 sys.path.insert(0, os.path.abspath('..'))
25 
26 # -- General configuration ------------------------------------------------
27 
28 # If your documentation needs a minimal Sphinx version, state it here.
29 #
30 # needs_sphinx = '1.0'
31 
32 # Add any Sphinx extension module names here, as strings. They can be
33 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
34 # ones.
35 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax',
36               'sphinx.ext.napoleon', 'sphinx.ext.intersphinx',
37               'sphinx_automodapi.automodapi',
38               'sphinx_automodapi.smart_resolver',
39               'sphinx_gallery.gen_gallery',
40               'sphinx.ext.graphviz']
41 
42 
43 intersphinx_mapping = {
44     'python': ('https://docs.python.org/3', None),
45     'numpy': ('https://docs.scipy.org/doc/numpy', None),
46     'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
47     'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None),
48     'astropy': ('http://docs.astropy.org/en/stable/', None)}
49 # Add any paths that contain templates here, relative to this directory.
50 templates_path = ['_templates']
51 
52 # The suffix(es) of source filenames.
53 # You can specify multiple suffix as a list of string:
54 #
55 # source_suffix = ['.rst', '.md']
56 source_suffix = '.rst'
57 
58 # The master toctree document.
59 master_doc = 'index'
60 
61 # General information about the project.
62 project = 'PlasmaPy'
63 copyright = '2015-2019, PlasmaPy Community'
64 author = 'PlasmaPy Community'
65 
66 # The version info for the project you're documenting, acts as replacement for
67 # |version| and |release|, also used in various other places throughout the
68 # built documents.
69 #
70 # The short X.Y version.
71 version = '0.2'
72 # The full version, including alpha/beta/rc tags.
73 release = '0.2.0'
74 
75 # The language for content autogenerated by Sphinx. Refer to documentation
76 # for a list of supported languages.
77 #
78 # This is also used if you do content translation via gettext catalogs.
79 # Usually you set "language" from the command line for these cases.
80 language = None
81 
82 # List of patterns, relative to source directory, that match files and
83 # directories to ignore when looking for source files.
84 # This patterns also effect to html_static_path and html_extra_path
85 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
86 
87 # The name of the Pygments (syntax highlighting) style to use.
88 pygments_style = 'sphinx'
89 
90 # If true, `todo` and `todoList` produce output, else they produce nothing.
91 todo_include_todos = False
92 
93 default_role = 'obj'
94 
95 # -- Options for HTML output ----------------------------------------------
96 
97 # The theme to use for HTML and HTML Help pages.  See the documentation for
98 # a list of builtin themes.
99 #
100 # html_theme = 'alabaster'
101 # html_theme = 'traditional'
102 # html_theme = 'agogo'
103 html_theme = "sphinx_rtd_theme"
104 
105 # Theme options are theme-specific and customize the look and feel of a theme
106 # further.  For a list of options available for each theme, see the
107 # documentation.
108 #
109 # html_theme_options = {}
110 
111 # Add any paths that contain custom static files (such as style sheets) here,
112 # relative to this directory. They are copied after the builtin static files,
113 # so a file named "default.css" will overwrite the builtin "default.css".
114 # html_static_path = ['_static']
115 
116 
117 # -- Options for HTMLHelp output ------------------------------------------
118 
119 # Output file base name for HTML help builder.
120 htmlhelp_basename = 'PlasmaPydoc'
121 
122 
123 # -- Options for LaTeX output ---------------------------------------------
124 
125 latex_elements = {
126     # The paper size ('letterpaper' or 'a4paper').
127     #
128     # 'papersize': 'letterpaper',
129 
130     # The font size ('10pt', '11pt' or '12pt').
131     #
132     # 'pointsize': '10pt',
133 
134     # Additional stuff for the LaTeX preamble.
135     #
136     # 'preamble': '',
137 
138     # Latex figure (float) alignment
139     #
140     # 'figure_align': 'htbp',
141 }
142 
143 # Grouping the document tree into LaTeX files. List of tuples
144 # (source start file, target name, title,
145 #  author, documentclass [howto, manual, or own class]).
146 latex_documents = [
147     (master_doc, 'PlasmaPy.tex', 'PlasmaPy Documentation',
148      'PlasmaPy Community', 'manual'),
149 ]
150 
151 
152 # -- Options for manual page output ---------------------------------------
153 
154 # One entry per manual page. List of tuples
155 # (source start file, name, description, authors, manual section).
156 man_pages = [
157     (master_doc, 'plasmapy', 'PlasmaPy Documentation',
158      [author], 1)
159 ]
160 
161 
162 # -- Options for Texinfo output -------------------------------------------
163 
164 # Grouping the document tree into Texinfo files. List of tuples
165 # (source start file, target name, title, author,
166 #  dir menu entry, description, category)
167 texinfo_documents = [
168     (master_doc, 'PlasmaPy', 'PlasmaPy Documentation',
169      author, 'PlasmaPy', 'Python package for plasma physics',
170      'Miscellaneous'),
171 ]
172 
173 html_favicon = "./_static/icon.ico"
174 
175 # -- Options for Sphinx Gallery -----------------
176 
177 sphinx_gallery_conf = {
178     # path to your examples scripts
179     'examples_dirs': '../plasmapy/examples',
180     # path where to save gallery generated examples
181     'backreferences_dir': 'gen_modules/backreferences',
182     'gallery_dirs': 'auto_examples',
183 }
184
```
--- 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/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -180,4 +180,15 @@
     # path where to save gallery generated examples
     'backreferences_dir': 'gen_modules/backreferences',
     'gallery_dirs': 'auto_examples',
+    'binder': {
+        # Required keys
+        'org': 'PlasmaPy',
+        'repo': 'PlasmaPy',
+        'branch': 'master',  # noqa: E501 Can be any branch, tag, or commit hash. Use a branch that hosts your docs.
+        'binderhub_url': 'https://mybinder.org',  # noqa: E501 Any URL of a binderhub deployment. Must be full URL (e.g. https://mybinder.org).
+        'dependencies': [
+            '../requirements/environment.yml'
+        ],
+        'use_jupyter_lab': True,
+    },
 }

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -180,4 +180,15 @@\n     # path where to save gallery generated examples\n     'backreferences_dir': 'gen_modules/backreferences',\n     'gallery_dirs': 'auto_examples',\n+    'binder': {\n+        # Required keys\n+        'org': 'PlasmaPy',\n+        'repo': 'PlasmaPy',\n+        'branch': 'master',  # noqa: E501 Can be any branch, tag, or commit hash. Use a branch that hosts your docs.\n+        'binderhub_url': 'https://mybinder.org',  # noqa: E501 Any URL of a binderhub deployment. Must be full URL (e.g. https://mybinder.org).\n+        'dependencies': [\n+            '../requirements/environment.yml'\n+        ],\n+        'use_jupyter_lab': True,\n+    },\n }\n", "issue": "Add binder links to generated example notebooks\nStumbled upon at #638 \r\n\r\n* Binder is a cool tool I'd love to learn more about\r\n* https://sphinx-gallery.github.io/configuration.html#binder-links is pretty cool\r\n\t* https://github.com/mne-tools/mne-bids/pull/207/files is an implementation\n", "before_files": [{"content": "#!/usr/bin/env python3.6\n# -*- coding: utf-8 -*-\n#\n# PlasmaPy documentation build configuration file, created by\n# sphinx-quickstart on Wed May 31 18:16:46 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\n\nimport os\nimport sys\n\nsys.path.insert(0, os.path.abspath('..'))\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax',\n              'sphinx.ext.napoleon', 'sphinx.ext.intersphinx',\n              'sphinx_automodapi.automodapi',\n              'sphinx_automodapi.smart_resolver',\n              'sphinx_gallery.gen_gallery',\n              'sphinx.ext.graphviz']\n\n\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/3', None),\n    'numpy': ('https://docs.scipy.org/doc/numpy', None),\n    'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),\n    'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None),\n    'astropy': ('http://docs.astropy.org/en/stable/', None)}\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\n# source_suffix = ['.rst', '.md']\nsource_suffix = '.rst'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'PlasmaPy'\ncopyright = '2015-2019, PlasmaPy Community'\nauthor = 'PlasmaPy Community'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = '0.2'\n# The full version, including alpha/beta/rc tags.\nrelease = '0.2.0'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\ndefault_role = 'obj'\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\n# html_theme = 'alabaster'\n# html_theme = 'traditional'\n# html_theme = 'agogo'\nhtml_theme = \"sphinx_rtd_theme\"\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\n# html_theme_options = {}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\n# html_static_path = ['_static']\n\n\n# -- Options for HTMLHelp output ------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'PlasmaPydoc'\n\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (master_doc, 'PlasmaPy.tex', 'PlasmaPy Documentation',\n     'PlasmaPy Community', 'manual'),\n]\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'plasmapy', 'PlasmaPy Documentation',\n     [author], 1)\n]\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (master_doc, 'PlasmaPy', 'PlasmaPy Documentation',\n     author, 'PlasmaPy', 'Python package for plasma physics',\n     'Miscellaneous'),\n]\n\nhtml_favicon = \"./_static/icon.ico\"\n\n# -- Options for Sphinx Gallery -----------------\n\nsphinx_gallery_conf = {\n    # path to your examples scripts\n    'examples_dirs': '../plasmapy/examples',\n    # path where to save gallery generated examples\n    'backreferences_dir': 'gen_modules/backreferences',\n    'gallery_dirs': 'auto_examples',\n}\n", "path": "docs/conf.py"}], "after_files": [{"content": "#!/usr/bin/env python3.6\n# -*- coding: utf-8 -*-\n#\n# PlasmaPy documentation build configuration file, created by\n# sphinx-quickstart on Wed May 31 18:16:46 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\n\nimport os\nimport sys\n\nsys.path.insert(0, os.path.abspath('..'))\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax',\n              'sphinx.ext.napoleon', 'sphinx.ext.intersphinx',\n              'sphinx_automodapi.automodapi',\n              'sphinx_automodapi.smart_resolver',\n              'sphinx_gallery.gen_gallery',\n              'sphinx.ext.graphviz']\n\n\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/3', None),\n    'numpy': ('https://docs.scipy.org/doc/numpy', None),\n    'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),\n    'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None),\n    'astropy': ('http://docs.astropy.org/en/stable/', None)}\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\n# source_suffix = ['.rst', '.md']\nsource_suffix = '.rst'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'PlasmaPy'\ncopyright = '2015-2019, PlasmaPy Community'\nauthor = 'PlasmaPy Community'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = '0.2'\n# The full version, including alpha/beta/rc tags.\nrelease = '0.2.0'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\ndefault_role = 'obj'\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\n# html_theme = 'alabaster'\n# html_theme = 'traditional'\n# html_theme = 'agogo'\nhtml_theme = \"sphinx_rtd_theme\"\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\n# html_theme_options = {}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\n# html_static_path = ['_static']\n\n\n# -- Options for HTMLHelp output ------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'PlasmaPydoc'\n\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (master_doc, 'PlasmaPy.tex', 'PlasmaPy Documentation',\n     'PlasmaPy Community', 'manual'),\n]\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'plasmapy', 'PlasmaPy Documentation',\n     [author], 1)\n]\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (master_doc, 'PlasmaPy', 'PlasmaPy Documentation',\n     author, 'PlasmaPy', 'Python package for plasma physics',\n     'Miscellaneous'),\n]\n\nhtml_favicon = \"./_static/icon.ico\"\n\n# -- Options for Sphinx Gallery -----------------\n\nsphinx_gallery_conf = {\n    # path to your examples scripts\n    'examples_dirs': '../plasmapy/examples',\n    # path where to save gallery generated examples\n    'backreferences_dir': 'gen_modules/backreferences',\n    'gallery_dirs': 'auto_examples',\n    'binder': {\n        # Required keys\n        'org': 'PlasmaPy',\n        'repo': 'PlasmaPy',\n        'branch': 'master',  # noqa: E501 Can be any branch, tag, or commit hash. Use a branch that hosts your docs.\n        'binderhub_url': 'https://mybinder.org',  # noqa: E501 Any URL of a binderhub deployment. Must be full URL (e.g. https://mybinder.org).\n        'dependencies': [\n            '../requirements/environment.yml'\n        ],\n        'use_jupyter_lab': True,\n    },\n}\n", "path": "docs/conf.py"}]}