We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
0.9.4 Release
@tyarkoni We've built up a [changelog](https://github.com/bids-standard/pybids/releases/tag/untagged-aa777a4ea34ce82990cd), so it'd be good to release soon. Any blocking issues?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `tools/prep_zenodo.py`
Content:
```
1 #!/usr/bin/env python3
2 import git
3 import json
4 from subprocess import run, PIPE, CalledProcessError
5 from pathlib import Path
6 from tempfile import TemporaryDirectory
7 
8 
9 def decommify(name):
10     return ' '.join(name.split(', ')[::-1])
11 
12 
13 # List of repositories whose commits should be counted as contributions
14 codependents = [('https://github.com/grabbles/grabbit.git', '0.2.6')]
15 
16 # Last shablona commit
17 origin_commit = 'd72caaf5933907ed699d57faddaec7bfc836ce6f'
18 
19 git_root = Path(git.Repo('.', search_parent_directories=True).working_dir)
20 zenodo_file = git_root / '.zenodo.json'
21 
22 zenodo = json.loads(zenodo_file.read_text()) if zenodo_file.exists() else {}
23 
24 orig_creators = zenodo.get('creators', [])
25 creator_map = {decommify(creator['name']): creator
26                for creator in orig_creators}
27 
28 shortlog = run(['git', 'shortlog', '-ns', f'{origin_commit}..'], stdout=PIPE)
29 counts = [line.split('\t', 1)[::-1]
30           for line in shortlog.stdout.decode().split('\n') if line]
31 
32 # Get additional commit counts from dependencies
33 with TemporaryDirectory() as tmpdir:
34     tmppath = Path(tmpdir)
35     for repo in codependents:
36         try:
37             repo, ref = repo
38         except (TypeError, ValueError):
39             ref = None
40         repo_dir = str(tmppath / repo.rsplit('/', 1)[1].split('.', 1)[0])
41         try:
42             clone = run(['git', 'clone', '-q', repo, repo_dir], check=True)
43         except CalledProcessError as err:
44             raise RuntimeError("Could not clone {}".format(repo)) from err
45 
46         if ref is None:
47             tag = run(['git', '-C', repo_dir, 'tag'], stdout=PIPE)
48             # latest tag
49             ref = tag.stdout.decode().strip().rsplit('\n', 1)[1]
50 
51         dep_shortlog = run(
52             ['git', '-C', repo_dir, 'shortlog', '-ns', ref],
53             stdout=PIPE)
54         counts.extend(line.split('\t', 1)[::-1]
55                       for line in dep_shortlog.stdout.decode().split('\n')
56                       if line)
57 
58 commit_counts = {}
59 for committer, commits in counts:
60     commit_counts[committer] = commit_counts.get(committer, 0) + int(commits)
61 
62 # Stable sort:
63 # Number of commits in reverse order
64 # Ties broken by alphabetical order of first name
65 committers = [committer
66               for committer, _ in sorted(commit_counts.items(),
67                                          key=lambda x: (-x[1], x[0]))]
68 
69 # Tal to the top
70 first_author = 'Tal Yarkoni'
71 if committers[0] != first_author:
72     committers.remove(first_author)
73     committers.insert(0, first_author)
74 
75 creators = [
76     creator_map.get(committer, {'name': committer})
77     for committer in committers
78     ]
79 
80 zenodo['creators'] = creators
81 zenodo_file.write_text(json.dumps(zenodo, indent=2) + '\n')
82
```
--- 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/tools/prep_zenodo.py b/tools/prep_zenodo.py
--- a/tools/prep_zenodo.py
+++ b/tools/prep_zenodo.py
@@ -9,6 +9,11 @@
 def decommify(name):
     return ' '.join(name.split(', ')[::-1])
 
+# Users who have asked not to be cited at this time
+# XXX We should add a shortlog since the most recent tag and explicitly note
+# that a blacklisted user has contributed again recently, and verify they still
+# do not want to be cited.
+blacklist = {'Cecile Madjar'}
 
 # List of repositories whose commits should be counted as contributions
 codependents = [('https://github.com/grabbles/grabbit.git', '0.2.6')]
@@ -75,6 +80,7 @@
 creators = [
     creator_map.get(committer, {'name': committer})
     for committer in committers
+    if committer not in blacklist
     ]
 
 zenodo['creators'] = creators

{"golden_diff": "diff --git a/tools/prep_zenodo.py b/tools/prep_zenodo.py\n--- a/tools/prep_zenodo.py\n+++ b/tools/prep_zenodo.py\n@@ -9,6 +9,11 @@\n def decommify(name):\n     return ' '.join(name.split(', ')[::-1])\n \n+# Users who have asked not to be cited at this time\n+# XXX We should add a shortlog since the most recent tag and explicitly note\n+# that a blacklisted user has contributed again recently, and verify they still\n+# do not want to be cited.\n+blacklist = {'Cecile Madjar'}\n \n # List of repositories whose commits should be counted as contributions\n codependents = [('https://github.com/grabbles/grabbit.git', '0.2.6')]\n@@ -75,6 +80,7 @@\n creators = [\n     creator_map.get(committer, {'name': committer})\n     for committer in committers\n+    if committer not in blacklist\n     ]\n \n zenodo['creators'] = creators\n", "issue": "0.9.4 Release\n@tyarkoni We've built up a [changelog](https://github.com/bids-standard/pybids/releases/tag/untagged-aa777a4ea34ce82990cd), so it'd be good to release soon. Any blocking issues?\n", "before_files": [{"content": "#!/usr/bin/env python3\nimport git\nimport json\nfrom subprocess import run, PIPE, CalledProcessError\nfrom pathlib import Path\nfrom tempfile import TemporaryDirectory\n\n\ndef decommify(name):\n    return ' '.join(name.split(', ')[::-1])\n\n\n# List of repositories whose commits should be counted as contributions\ncodependents = [('https://github.com/grabbles/grabbit.git', '0.2.6')]\n\n# Last shablona commit\norigin_commit = 'd72caaf5933907ed699d57faddaec7bfc836ce6f'\n\ngit_root = Path(git.Repo('.', search_parent_directories=True).working_dir)\nzenodo_file = git_root / '.zenodo.json'\n\nzenodo = json.loads(zenodo_file.read_text()) if zenodo_file.exists() else {}\n\norig_creators = zenodo.get('creators', [])\ncreator_map = {decommify(creator['name']): creator\n               for creator in orig_creators}\n\nshortlog = run(['git', 'shortlog', '-ns', f'{origin_commit}..'], stdout=PIPE)\ncounts = [line.split('\\t', 1)[::-1]\n          for line in shortlog.stdout.decode().split('\\n') if line]\n\n# Get additional commit counts from dependencies\nwith TemporaryDirectory() as tmpdir:\n    tmppath = Path(tmpdir)\n    for repo in codependents:\n        try:\n            repo, ref = repo\n        except (TypeError, ValueError):\n            ref = None\n        repo_dir = str(tmppath / repo.rsplit('/', 1)[1].split('.', 1)[0])\n        try:\n            clone = run(['git', 'clone', '-q', repo, repo_dir], check=True)\n        except CalledProcessError as err:\n            raise RuntimeError(\"Could not clone {}\".format(repo)) from err\n\n        if ref is None:\n            tag = run(['git', '-C', repo_dir, 'tag'], stdout=PIPE)\n            # latest tag\n            ref = tag.stdout.decode().strip().rsplit('\\n', 1)[1]\n\n        dep_shortlog = run(\n            ['git', '-C', repo_dir, 'shortlog', '-ns', ref],\n            stdout=PIPE)\n        counts.extend(line.split('\\t', 1)[::-1]\n                      for line in dep_shortlog.stdout.decode().split('\\n')\n                      if line)\n\ncommit_counts = {}\nfor committer, commits in counts:\n    commit_counts[committer] = commit_counts.get(committer, 0) + int(commits)\n\n# Stable sort:\n# Number of commits in reverse order\n# Ties broken by alphabetical order of first name\ncommitters = [committer\n              for committer, _ in sorted(commit_counts.items(),\n                                         key=lambda x: (-x[1], x[0]))]\n\n# Tal to the top\nfirst_author = 'Tal Yarkoni'\nif committers[0] != first_author:\n    committers.remove(first_author)\n    committers.insert(0, first_author)\n\ncreators = [\n    creator_map.get(committer, {'name': committer})\n    for committer in committers\n    ]\n\nzenodo['creators'] = creators\nzenodo_file.write_text(json.dumps(zenodo, indent=2) + '\\n')\n", "path": "tools/prep_zenodo.py"}], "after_files": [{"content": "#!/usr/bin/env python3\nimport git\nimport json\nfrom subprocess import run, PIPE, CalledProcessError\nfrom pathlib import Path\nfrom tempfile import TemporaryDirectory\n\n\ndef decommify(name):\n    return ' '.join(name.split(', ')[::-1])\n\n# Users who have asked not to be cited at this time\n# XXX We should add a shortlog since the most recent tag and explicitly note\n# that a blacklisted user has contributed again recently, and verify they still\n# do not want to be cited.\nblacklist = {'Cecile Madjar'}\n\n# List of repositories whose commits should be counted as contributions\ncodependents = [('https://github.com/grabbles/grabbit.git', '0.2.6')]\n\n# Last shablona commit\norigin_commit = 'd72caaf5933907ed699d57faddaec7bfc836ce6f'\n\ngit_root = Path(git.Repo('.', search_parent_directories=True).working_dir)\nzenodo_file = git_root / '.zenodo.json'\n\nzenodo = json.loads(zenodo_file.read_text()) if zenodo_file.exists() else {}\n\norig_creators = zenodo.get('creators', [])\ncreator_map = {decommify(creator['name']): creator\n               for creator in orig_creators}\n\nshortlog = run(['git', 'shortlog', '-ns', f'{origin_commit}..'], stdout=PIPE)\ncounts = [line.split('\\t', 1)[::-1]\n          for line in shortlog.stdout.decode().split('\\n') if line]\n\n# Get additional commit counts from dependencies\nwith TemporaryDirectory() as tmpdir:\n    tmppath = Path(tmpdir)\n    for repo in codependents:\n        try:\n            repo, ref = repo\n        except (TypeError, ValueError):\n            ref = None\n        repo_dir = str(tmppath / repo.rsplit('/', 1)[1].split('.', 1)[0])\n        try:\n            clone = run(['git', 'clone', '-q', repo, repo_dir], check=True)\n        except CalledProcessError as err:\n            raise RuntimeError(\"Could not clone {}\".format(repo)) from err\n\n        if ref is None:\n            tag = run(['git', '-C', repo_dir, 'tag'], stdout=PIPE)\n            # latest tag\n            ref = tag.stdout.decode().strip().rsplit('\\n', 1)[1]\n\n        dep_shortlog = run(\n            ['git', '-C', repo_dir, 'shortlog', '-ns', ref],\n            stdout=PIPE)\n        counts.extend(line.split('\\t', 1)[::-1]\n                      for line in dep_shortlog.stdout.decode().split('\\n')\n                      if line)\n\ncommit_counts = {}\nfor committer, commits in counts:\n    commit_counts[committer] = commit_counts.get(committer, 0) + int(commits)\n\n# Stable sort:\n# Number of commits in reverse order\n# Ties broken by alphabetical order of first name\ncommitters = [committer\n              for committer, _ in sorted(commit_counts.items(),\n                                         key=lambda x: (-x[1], x[0]))]\n\n# Tal to the top\nfirst_author = 'Tal Yarkoni'\nif committers[0] != first_author:\n    committers.remove(first_author)\n    committers.insert(0, first_author)\n\ncreators = [\n    creator_map.get(committer, {'name': committer})\n    for committer in committers\n    if committer not in blacklist\n    ]\n\nzenodo['creators'] = creators\nzenodo_file.write_text(json.dumps(zenodo, indent=2) + '\\n')\n", "path": "tools/prep_zenodo.py"}]}