We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Switch to jnius_config.add_classpath
Currently, pyserini replaces any previously registered jars on the classpath in its setup code. Is there any reason to not use add_classpath() instead of set_classpath()?

Here is the pyjnius relevant code:
```python
def set_classpath(*path):
    """
    Sets the classpath for the JVM to use. Replaces any existing classpath, overriding the CLASSPATH environment variable.
    """
    check_vm_running()
    global classpath
    classpath = list(path)


def add_classpath(*path):
    """
    Appends items to the classpath for the JVM to use.
    Replaces any existing classpath, overriding the CLASSPATH environment variable.
    """
    check_vm_running()
    global classpath
    if classpath is None:
        classpath = list(path)
    else:
        classpath.extend(path)
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pyserini/setup.py`
Content:
```
1 #
2 # Pyserini: Reproducible IR research with sparse and dense representations
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 
17 """
18 Module for adding Anserini jar to classpath for pyjnius usage
19 """
20 
21 import glob
22 import os
23 
24 import jnius_config
25 
26 
27 def configure_classpath(anserini_root="."):
28     """
29     Parameters
30     ----------
31     anserini_root : str
32         (Optional) path to root anserini directory.
33 
34     """
35     paths = glob.glob(os.path.join(anserini_root, 'anserini-*-fatjar.jar'))
36     if not paths:
37         raise Exception('No matching jar file found in {}'.format(os.path.abspath(anserini_root)))
38 
39     latest = max(paths, key=os.path.getctime)
40     jnius_config.set_classpath(latest)
41
```
--- 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/pyserini/setup.py b/pyserini/setup.py
--- a/pyserini/setup.py
+++ b/pyserini/setup.py
@@ -37,4 +37,4 @@
         raise Exception('No matching jar file found in {}'.format(os.path.abspath(anserini_root)))
 
     latest = max(paths, key=os.path.getctime)
-    jnius_config.set_classpath(latest)
+    jnius_config.add_classpath(latest)

{"golden_diff": "diff --git a/pyserini/setup.py b/pyserini/setup.py\n--- a/pyserini/setup.py\n+++ b/pyserini/setup.py\n@@ -37,4 +37,4 @@\n         raise Exception('No matching jar file found in {}'.format(os.path.abspath(anserini_root)))\n \n     latest = max(paths, key=os.path.getctime)\n-    jnius_config.set_classpath(latest)\n+    jnius_config.add_classpath(latest)\n", "issue": "Switch to jnius_config.add_classpath\nCurrently, pyserini replaces any previously registered jars on the classpath in its setup code. Is there any reason to not use add_classpath() instead of set_classpath()?\r\n\r\nHere is the pyjnius relevant code:\r\n```python\r\ndef set_classpath(*path):\r\n    \"\"\"\r\n    Sets the classpath for the JVM to use. Replaces any existing classpath, overriding the CLASSPATH environment variable.\r\n    \"\"\"\r\n    check_vm_running()\r\n    global classpath\r\n    classpath = list(path)\r\n\r\n\r\ndef add_classpath(*path):\r\n    \"\"\"\r\n    Appends items to the classpath for the JVM to use.\r\n    Replaces any existing classpath, overriding the CLASSPATH environment variable.\r\n    \"\"\"\r\n    check_vm_running()\r\n    global classpath\r\n    if classpath is None:\r\n        classpath = list(path)\r\n    else:\r\n        classpath.extend(path)\r\n```\n", "before_files": [{"content": "#\n# Pyserini: Reproducible IR research with sparse and dense representations\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\"\"\"\nModule for adding Anserini jar to classpath for pyjnius usage\n\"\"\"\n\nimport glob\nimport os\n\nimport jnius_config\n\n\ndef configure_classpath(anserini_root=\".\"):\n    \"\"\"\n    Parameters\n    ----------\n    anserini_root : str\n        (Optional) path to root anserini directory.\n\n    \"\"\"\n    paths = glob.glob(os.path.join(anserini_root, 'anserini-*-fatjar.jar'))\n    if not paths:\n        raise Exception('No matching jar file found in {}'.format(os.path.abspath(anserini_root)))\n\n    latest = max(paths, key=os.path.getctime)\n    jnius_config.set_classpath(latest)\n", "path": "pyserini/setup.py"}], "after_files": [{"content": "#\n# Pyserini: Reproducible IR research with sparse and dense representations\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\"\"\"\nModule for adding Anserini jar to classpath for pyjnius usage\n\"\"\"\n\nimport glob\nimport os\n\nimport jnius_config\n\n\ndef configure_classpath(anserini_root=\".\"):\n    \"\"\"\n    Parameters\n    ----------\n    anserini_root : str\n        (Optional) path to root anserini directory.\n\n    \"\"\"\n    paths = glob.glob(os.path.join(anserini_root, 'anserini-*-fatjar.jar'))\n    if not paths:\n        raise Exception('No matching jar file found in {}'.format(os.path.abspath(anserini_root)))\n\n    latest = max(paths, key=os.path.getctime)\n    jnius_config.add_classpath(latest)\n", "path": "pyserini/setup.py"}]}