We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
prune dependencies that we do not really depend on
As became apparent in a discussion with @agramfort and @jasmainak, we probably do not need the `environment.yml` and instead should rely on minimal dependencies such as numpy, scipy, and matplotlib.

if we decide to keep the `environment.yml` for convenience during installation, we should at least prune it.





--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mne_bids/datasets.py`
Content:
```
1 """Helper functions to fetch data to work with."""
2 # Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>
3 #          Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
4 #          Teon Brooks <teon.brooks@gmail.com>
5 #          Stefan Appelhoff <stefan.appelhoff@mailbox.org>
6 #
7 # License: BSD (3-clause)
8 
9 import os
10 import os.path as op
11 import shutil
12 import tarfile
13 import requests
14 
15 from mne.utils import _fetch_file
16 
17 
18 def fetch_faces_data(data_path=None, repo='ds000117', subject_ids=[1]):
19     """Dataset fetcher for OpenfMRI dataset ds000117.
20 
21     Parameters
22     ----------
23     data_path : str | None
24         Path to the folder where data is stored. Defaults to
25         '~/mne_data/mne_bids_examples'
26     repo : str
27         The folder name. Defaults to 'ds000117'.
28     subject_ids : list of int
29         The subjects to fetch. Defaults to [1], downloading subject 1.
30 
31     Returns
32     -------
33     data_path : str
34         Path to the folder where data is stored.
35 
36     """
37     if not data_path:
38         home = os.path.expanduser('~')
39         data_path = os.path.join(home, 'mne_data', 'mne_bids_examples')
40         if not os.path.exists(data_path):
41             os.makedirs(data_path)
42 
43     for subject_id in subject_ids:
44         src_url = ('http://openfmri.s3.amazonaws.com/tarballs/'
45                    'ds117_R0.1.1_sub%03d_raw.tgz' % subject_id)
46         tar_fname = op.join(data_path, repo + '.tgz')
47         target_dir = op.join(data_path, repo)
48         if not op.exists(target_dir):
49             if not op.exists(tar_fname):
50                 _fetch_file(url=src_url, file_name=tar_fname,
51                             print_destination=True, resume=True, timeout=10.)
52             tf = tarfile.open(tar_fname)
53             print('Extracting files. This may take a while ...')
54             tf.extractall(path=data_path)
55             shutil.move(op.join(data_path, 'ds117'), target_dir)
56             os.remove(tar_fname)
57 
58     return data_path
59 
60 
61 def fetch_brainvision_testing_data(data_path=None):
62     """Download the MNE-Python testing data for the BrainVision format.
63 
64     Parameters
65     ----------
66     data_path : str | None
67         Path to the folder where data is stored. Defaults to
68         '~/mne_data/mne_bids_examples'
69 
70     Returns
71     -------
72     data_path : str
73         Path to the folder where data is stored.
74 
75     """
76     if not data_path:
77         home = os.path.expanduser('~')
78         data_path = os.path.join(home, 'mne_data', 'mne_bids_examples')
79         if not os.path.exists(data_path):
80             os.makedirs(data_path)
81 
82     base_url = 'https://github.com/mne-tools/mne-python/'
83     base_url += 'raw/master/mne/io/brainvision/tests/data/test'
84     file_endings = ['.vhdr', '.vmrk', '.eeg', ]
85 
86     for f_ending in file_endings:
87         url = base_url + f_ending
88         response = requests.get(url)
89 
90         fname = os.path.join(data_path, 'test' + f_ending)
91         with open(fname, 'wb') as fout:
92             fout.write(response.content)
93 
94     return data_path
95
```
--- 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/mne_bids/datasets.py b/mne_bids/datasets.py
--- a/mne_bids/datasets.py
+++ b/mne_bids/datasets.py
@@ -10,7 +10,7 @@
 import os.path as op
 import shutil
 import tarfile
-import requests
+from six.moves import urllib
 
 from mne.utils import _fetch_file
 
@@ -85,10 +85,10 @@
 
     for f_ending in file_endings:
         url = base_url + f_ending
-        response = requests.get(url)
+        response = urllib.request.urlopen(url)
 
         fname = os.path.join(data_path, 'test' + f_ending)
         with open(fname, 'wb') as fout:
-            fout.write(response.content)
+            fout.write(response.read())
 
     return data_path

{"golden_diff": "diff --git a/mne_bids/datasets.py b/mne_bids/datasets.py\n--- a/mne_bids/datasets.py\n+++ b/mne_bids/datasets.py\n@@ -10,7 +10,7 @@\n import os.path as op\n import shutil\n import tarfile\n-import requests\n+from six.moves import urllib\n \n from mne.utils import _fetch_file\n \n@@ -85,10 +85,10 @@\n \n     for f_ending in file_endings:\n         url = base_url + f_ending\n-        response = requests.get(url)\n+        response = urllib.request.urlopen(url)\n \n         fname = os.path.join(data_path, 'test' + f_ending)\n         with open(fname, 'wb') as fout:\n-            fout.write(response.content)\n+            fout.write(response.read())\n \n     return data_path\n", "issue": "prune dependencies that we do not really depend on\nAs became apparent in a discussion with @agramfort and @jasmainak, we probably do not need the `environment.yml` and instead should rely on minimal dependencies such as numpy, scipy, and matplotlib.\r\n\r\nif we decide to keep the `environment.yml` for convenience during installation, we should at least prune it.\r\n\r\n\r\n\r\n\n", "before_files": [{"content": "\"\"\"Helper functions to fetch data to work with.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n#          Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n#          Teon Brooks <teon.brooks@gmail.com>\n#          Stefan Appelhoff <stefan.appelhoff@mailbox.org>\n#\n# License: BSD (3-clause)\n\nimport os\nimport os.path as op\nimport shutil\nimport tarfile\nimport requests\n\nfrom mne.utils import _fetch_file\n\n\ndef fetch_faces_data(data_path=None, repo='ds000117', subject_ids=[1]):\n    \"\"\"Dataset fetcher for OpenfMRI dataset ds000117.\n\n    Parameters\n    ----------\n    data_path : str | None\n        Path to the folder where data is stored. Defaults to\n        '~/mne_data/mne_bids_examples'\n    repo : str\n        The folder name. Defaults to 'ds000117'.\n    subject_ids : list of int\n        The subjects to fetch. Defaults to [1], downloading subject 1.\n\n    Returns\n    -------\n    data_path : str\n        Path to the folder where data is stored.\n\n    \"\"\"\n    if not data_path:\n        home = os.path.expanduser('~')\n        data_path = os.path.join(home, 'mne_data', 'mne_bids_examples')\n        if not os.path.exists(data_path):\n            os.makedirs(data_path)\n\n    for subject_id in subject_ids:\n        src_url = ('http://openfmri.s3.amazonaws.com/tarballs/'\n                   'ds117_R0.1.1_sub%03d_raw.tgz' % subject_id)\n        tar_fname = op.join(data_path, repo + '.tgz')\n        target_dir = op.join(data_path, repo)\n        if not op.exists(target_dir):\n            if not op.exists(tar_fname):\n                _fetch_file(url=src_url, file_name=tar_fname,\n                            print_destination=True, resume=True, timeout=10.)\n            tf = tarfile.open(tar_fname)\n            print('Extracting files. This may take a while ...')\n            tf.extractall(path=data_path)\n            shutil.move(op.join(data_path, 'ds117'), target_dir)\n            os.remove(tar_fname)\n\n    return data_path\n\n\ndef fetch_brainvision_testing_data(data_path=None):\n    \"\"\"Download the MNE-Python testing data for the BrainVision format.\n\n    Parameters\n    ----------\n    data_path : str | None\n        Path to the folder where data is stored. Defaults to\n        '~/mne_data/mne_bids_examples'\n\n    Returns\n    -------\n    data_path : str\n        Path to the folder where data is stored.\n\n    \"\"\"\n    if not data_path:\n        home = os.path.expanduser('~')\n        data_path = os.path.join(home, 'mne_data', 'mne_bids_examples')\n        if not os.path.exists(data_path):\n            os.makedirs(data_path)\n\n    base_url = 'https://github.com/mne-tools/mne-python/'\n    base_url += 'raw/master/mne/io/brainvision/tests/data/test'\n    file_endings = ['.vhdr', '.vmrk', '.eeg', ]\n\n    for f_ending in file_endings:\n        url = base_url + f_ending\n        response = requests.get(url)\n\n        fname = os.path.join(data_path, 'test' + f_ending)\n        with open(fname, 'wb') as fout:\n            fout.write(response.content)\n\n    return data_path\n", "path": "mne_bids/datasets.py"}], "after_files": [{"content": "\"\"\"Helper functions to fetch data to work with.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n#          Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n#          Teon Brooks <teon.brooks@gmail.com>\n#          Stefan Appelhoff <stefan.appelhoff@mailbox.org>\n#\n# License: BSD (3-clause)\n\nimport os\nimport os.path as op\nimport shutil\nimport tarfile\nfrom six.moves import urllib\n\nfrom mne.utils import _fetch_file\n\n\ndef fetch_faces_data(data_path=None, repo='ds000117', subject_ids=[1]):\n    \"\"\"Dataset fetcher for OpenfMRI dataset ds000117.\n\n    Parameters\n    ----------\n    data_path : str | None\n        Path to the folder where data is stored. Defaults to\n        '~/mne_data/mne_bids_examples'\n    repo : str\n        The folder name. Defaults to 'ds000117'.\n    subject_ids : list of int\n        The subjects to fetch. Defaults to [1], downloading subject 1.\n\n    Returns\n    -------\n    data_path : str\n        Path to the folder where data is stored.\n\n    \"\"\"\n    if not data_path:\n        home = os.path.expanduser('~')\n        data_path = os.path.join(home, 'mne_data', 'mne_bids_examples')\n        if not os.path.exists(data_path):\n            os.makedirs(data_path)\n\n    for subject_id in subject_ids:\n        src_url = ('http://openfmri.s3.amazonaws.com/tarballs/'\n                   'ds117_R0.1.1_sub%03d_raw.tgz' % subject_id)\n        tar_fname = op.join(data_path, repo + '.tgz')\n        target_dir = op.join(data_path, repo)\n        if not op.exists(target_dir):\n            if not op.exists(tar_fname):\n                _fetch_file(url=src_url, file_name=tar_fname,\n                            print_destination=True, resume=True, timeout=10.)\n            tf = tarfile.open(tar_fname)\n            print('Extracting files. This may take a while ...')\n            tf.extractall(path=data_path)\n            shutil.move(op.join(data_path, 'ds117'), target_dir)\n            os.remove(tar_fname)\n\n    return data_path\n\n\ndef fetch_brainvision_testing_data(data_path=None):\n    \"\"\"Download the MNE-Python testing data for the BrainVision format.\n\n    Parameters\n    ----------\n    data_path : str | None\n        Path to the folder where data is stored. Defaults to\n        '~/mne_data/mne_bids_examples'\n\n    Returns\n    -------\n    data_path : str\n        Path to the folder where data is stored.\n\n    \"\"\"\n    if not data_path:\n        home = os.path.expanduser('~')\n        data_path = os.path.join(home, 'mne_data', 'mne_bids_examples')\n        if not os.path.exists(data_path):\n            os.makedirs(data_path)\n\n    base_url = 'https://github.com/mne-tools/mne-python/'\n    base_url += 'raw/master/mne/io/brainvision/tests/data/test'\n    file_endings = ['.vhdr', '.vmrk', '.eeg', ]\n\n    for f_ending in file_endings:\n        url = base_url + f_ending\n        response = urllib.request.urlopen(url)\n\n        fname = os.path.join(data_path, 'test' + f_ending)\n        with open(fname, 'wb') as fout:\n            fout.write(response.read())\n\n    return data_path\n", "path": "mne_bids/datasets.py"}]}