We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix bug in `is_unweighted` for sparse
- [ ] Does this PR add any new dependencies?
- [ ] Does this PR modify any existing APIs?
   - [ ] Is the change to the API backwards compatible?
- [ ] Have you built the documentation (reference and/or tutorial) and verified the generated documentation is appropriate?

#### Reference Issues/PRs

#### What does this implement/fix? Briefly explain your changes.
`is_unweighted` doesn't work properly for a sparse array input

#### Any other comments?
I think we could instead just do `graph[graph != 0].max() == 1 and graph[graph != 0].min() == 1`
for that entire section of the code.
[BUG] Bug in joblib transitive dependency causes exception when multi-threading
## Expected Behavior
Multi-threading LatentDistributionTest using a "workers" value != 1 should return without error on all platforms.

## Actual Behavior
When using any "workers" value > 1 or equal to -1 on a Windows computer, the code throws an exception.

## Example Code

```python
test = LatentDistributionTest(input_graph=False, workers=10)
result = test.fit_predict(graph1, graph2)
```

## Full Traceback
```pytb
C:\ProgramData\Anaconda3\lib\site-packages\joblib\disk.py:122: UserWarning: Unable to delete folder C:\Users\msrwinadm4\AppData\Local\Temp\5\joblib_memmapping_folder_11132_7308949288 after 5 tentatives.
  .format(folder_path, RM_SUBDIRS_N_RETRY))
Traceback (most recent call last):
  File "GraphsByOrg.py", line 79, in <module>
    logger.info(f'Calculating nonpar for {org1} and {org2}')
  File "C:\ProgramData\Anaconda3\lib\site-packages\graspologic\inference\latent_distribution_test.py", line 487, in fit_predict
    self.fit(A1, A2)
  File "C:\ProgramData\Anaconda3\lib\site-packages\graspologic\inference\latent_distribution_test.py", line 449, in fit
    X1_hat, X2_hat, reps=self.n_bootstraps, workers=self.workers, auto=False
  File "C:\ProgramData\Anaconda3\lib\site-packages\hyppo\ksample\ksamp.py", line 166, in test
    return self.indep_test.test(u, v, reps, workers, auto=auto)
  File "C:\ProgramData\Anaconda3\lib\site-packages\hyppo\independence\dcorr.py", line 215, in test
    stat, pvalue = super(Dcorr, self).test(x, y, reps, workers)
  File "C:\ProgramData\Anaconda3\lib\site-packages\hyppo\independence\base.py", line 67, in test
    self._statistic, x, y, reps=reps, workers=workers, is_distsim=is_distsim
  File "C:\ProgramData\Anaconda3\lib\site-packages\hyppo\_utils.py", line 140, in perm_test
    [delayed(_perm_stat)(calc_stat, x, y, is_distsim) for rep in range(reps)]
  File "C:\ProgramData\Anaconda3\lib\site-packages\joblib\parallel.py", line 1027, in __call__
    self._terminate_backend()
  File "C:\ProgramData\Anaconda3\lib\site-packages\joblib\parallel.py", line 734, in _terminate_backend
    self._backend.terminate()
  File "C:\ProgramData\Anaconda3\lib\site-packages\joblib\_parallel_backends.py", line 571, in terminate
    delete_folder(self._workers._temp_folder)
  File "C:\ProgramData\Anaconda3\lib\site-packages\joblib\disk.py", line 115, in delete_folder
    shutil.rmtree(folder_path, False, None)
  File "C:\ProgramData\Anaconda3\lib\shutil.py", line 516, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\ProgramData\Anaconda3\lib\shutil.py", line 400, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\ProgramData\Anaconda3\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\msrwinadm4\\AppData\\Local\\Temp\\5\\joblib_memmapping_folder_11132_7308949288\\11132-1819792920136-683b9c4b033b449dbac251acbe3decfb.pkl'
C:\ProgramData\Anaconda3\lib\site-packages\joblib\disk.py:122: UserWarning: Unable to delete folder C:\Users\msrwinadm4\AppData\Local\Temp\5\joblib_memmapping_folder_11132_7308949288 after 5 tentatives.
  .format(folder_path, RM_SUBDIRS_N_RETRY))
C:\ProgramData\Anaconda3\lib\site-packages\joblib\_memmapping_reducer.py:409: UserWarning: Failed to clean temporary folder: C:\Users\msrwinadm4\AppData\Local\Temp\5\joblib_memmapping_folder_11132_7308949288
  .format(pool_folder))

```

## Your Environment
* Python version: 3.7.6 (Anaconda)
* graspologic version: 0.1.0.dev331219603
* Windows 2016 Datacenter (448 GB RAM) x64

## Additional Details
graspologic==0.1.0.dev331219603
joblib==0.14.1
hyppo==0.1.3
scikit-image==0.16.2
scikit-learn==0.22.1
scipy==1.4.1
numpy==1.18.1

## Underlying problem:
Older versions of joblib have a known issue running on Windows.  See https://github.com/joblib/joblib/issues/806.  This appears to be fixed on May 3rd, 2020 by https://github.com/joblib/joblib/pull/966.

Hyppo uses joblib as a transitive dependency of scikit-learn but does not declare it as a dependency.  Scikit-learn only requires joblib 0.11 which does not include this fix.  See https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/_min_dependencies.py


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 # Copyright (c) Microsoft Corporation and contributors.
2 # Licensed under the MIT License.
3 
4 import os
5 import sys
6 from setuptools import setup, find_packages
7 
8 
9 MINIMUM_PYTHON_VERSION = 3, 6  # Minimum of Python 3.6
10 
11 if sys.version_info < MINIMUM_PYTHON_VERSION:
12     sys.exit("Python {}.{}+ is required.".format(*MINIMUM_PYTHON_VERSION))
13 
14 sys.path.insert(0, os.path.join("graspologic", "version"))
15 from version import version
16 
17 sys.path.pop(0)
18 
19 version_path = os.path.join("graspologic", "version", "version.txt")
20 with open(version_path, "w") as version_file:
21     version_file.write(f"{version}")
22 
23 with open("README.md", "r") as f:
24     LONG_DESCRIPTION = f.read()
25 
26 setup(
27     name="graspologic",
28     version=version,
29     description="A set of python modules for graph statistics",
30     long_description=LONG_DESCRIPTION,
31     long_description_content_type="text/markdown",
32     author="Eric Bridgeford, Jaewon Chung, Benjamin Pedigo, Bijan Varjavand",
33     author_email="j1c@jhu.edu",
34     maintainer="Dwayne Pryce",
35     maintainer_email="dwpryce@microsoft.com",
36     url="https://github.com/microsoft/graspologic",
37     license="MIT",
38     classifiers=[
39         "Development Status :: 3 - Alpha",
40         "Intended Audience :: Science/Research",
41         "Topic :: Scientific/Engineering :: Mathematics",
42         "License :: OSI Approved :: MIT License",
43         "Programming Language :: Python :: 3",
44         "Programming Language :: Python :: 3.6",
45         "Programming Language :: Python :: 3.7",
46     ],
47     packages=find_packages(exclude=["tests", "tests.*", "tests/*"]),
48     include_package_data=True,
49     package_data={"version": [os.path.join("graspologic", "version", "version.txt")]},
50     install_requires=[
51         "anytree>=2.8.0",
52         "gensim",
53         "hyppo>=0.1.3",
54         "matplotlib>=3.0.0,<=3.3.0",
55         "networkx>=2.1",
56         "numpy>=1.8.1",
57         "POT>=0.7.0",
58         "seaborn>=0.9.0",
59         "scikit-learn>=0.19.1",
60         "scipy>=1.4.0",
61     ],
62     extras_require={
63         "dev": [
64             "black",
65             "ipykernel>=5.1.0",
66             "ipython>=7.4.0",
67             "mypy",
68             "nbsphinx",
69             "numpydoc",
70             "pandoc",
71             "pytest",
72             "pytest-cov",
73             "sphinx",
74             "sphinxcontrib-rawfiles",
75             "sphinx-rtd-theme",
76             "testfixtures",
77         ]
78     },
79 )
80
```
--- 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/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -51,6 +51,7 @@
         "anytree>=2.8.0",
         "gensim",
         "hyppo>=0.1.3",
+        "joblib>=0.17.0", # Older versions of joblib cause issue #806.  Transitive dependency of hyppo.
         "matplotlib>=3.0.0,<=3.3.0",
         "networkx>=2.1",
         "numpy>=1.8.1",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -51,6 +51,7 @@\n         \"anytree>=2.8.0\",\n         \"gensim\",\n         \"hyppo>=0.1.3\",\n+        \"joblib>=0.17.0\", # Older versions of joblib cause issue #806.  Transitive dependency of hyppo.\n         \"matplotlib>=3.0.0,<=3.3.0\",\n         \"networkx>=2.1\",\n         \"numpy>=1.8.1\",\n", "issue": "Fix bug in `is_unweighted` for sparse\n- [ ] Does this PR add any new dependencies?\r\n- [ ] Does this PR modify any existing APIs?\r\n   - [ ] Is the change to the API backwards compatible?\r\n- [ ] Have you built the documentation (reference and/or tutorial) and verified the generated documentation is appropriate?\r\n\r\n#### Reference Issues/PRs\r\n\r\n#### What does this implement/fix? Briefly explain your changes.\r\n`is_unweighted` doesn't work properly for a sparse array input\r\n\r\n#### Any other comments?\r\nI think we could instead just do `graph[graph != 0].max() == 1 and graph[graph != 0].min() == 1`\r\nfor that entire section of the code.\n[BUG] Bug in joblib transitive dependency causes exception when multi-threading\n## Expected Behavior\r\nMulti-threading LatentDistributionTest using a \"workers\" value != 1 should return without error on all platforms.\r\n\r\n## Actual Behavior\r\nWhen using any \"workers\" value > 1 or equal to -1 on a Windows computer, the code throws an exception.\r\n\r\n## Example Code\r\n\r\n```python\r\ntest = LatentDistributionTest(input_graph=False, workers=10)\r\nresult = test.fit_predict(graph1, graph2)\r\n```\r\n\r\n## Full Traceback\r\n```pytb\r\nC:\\ProgramData\\Anaconda3\\lib\\site-packages\\joblib\\disk.py:122: UserWarning: Unable to delete folder C:\\Users\\msrwinadm4\\AppData\\Local\\Temp\\5\\joblib_memmapping_folder_11132_7308949288 after 5 tentatives.\r\n  .format(folder_path, RM_SUBDIRS_N_RETRY))\r\nTraceback (most recent call last):\r\n  File \"GraphsByOrg.py\", line 79, in <module>\r\n    logger.info(f'Calculating nonpar for {org1} and {org2}')\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\graspologic\\inference\\latent_distribution_test.py\", line 487, in fit_predict\r\n    self.fit(A1, A2)\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\graspologic\\inference\\latent_distribution_test.py\", line 449, in fit\r\n    X1_hat, X2_hat, reps=self.n_bootstraps, workers=self.workers, auto=False\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\hyppo\\ksample\\ksamp.py\", line 166, in test\r\n    return self.indep_test.test(u, v, reps, workers, auto=auto)\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\hyppo\\independence\\dcorr.py\", line 215, in test\r\n    stat, pvalue = super(Dcorr, self).test(x, y, reps, workers)\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\hyppo\\independence\\base.py\", line 67, in test\r\n    self._statistic, x, y, reps=reps, workers=workers, is_distsim=is_distsim\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\hyppo\\_utils.py\", line 140, in perm_test\r\n    [delayed(_perm_stat)(calc_stat, x, y, is_distsim) for rep in range(reps)]\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\joblib\\parallel.py\", line 1027, in __call__\r\n    self._terminate_backend()\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\joblib\\parallel.py\", line 734, in _terminate_backend\r\n    self._backend.terminate()\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\joblib\\_parallel_backends.py\", line 571, in terminate\r\n    delete_folder(self._workers._temp_folder)\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\site-packages\\joblib\\disk.py\", line 115, in delete_folder\r\n    shutil.rmtree(folder_path, False, None)\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\shutil.py\", line 516, in rmtree\r\n    return _rmtree_unsafe(path, onerror)\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\shutil.py\", line 400, in _rmtree_unsafe\r\n    onerror(os.unlink, fullname, sys.exc_info())\r\n  File \"C:\\ProgramData\\Anaconda3\\lib\\shutil.py\", line 398, in _rmtree_unsafe\r\n    os.unlink(fullname)\r\nPermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\msrwinadm4\\\\AppData\\\\Local\\\\Temp\\\\5\\\\joblib_memmapping_folder_11132_7308949288\\\\11132-1819792920136-683b9c4b033b449dbac251acbe3decfb.pkl'\r\nC:\\ProgramData\\Anaconda3\\lib\\site-packages\\joblib\\disk.py:122: UserWarning: Unable to delete folder C:\\Users\\msrwinadm4\\AppData\\Local\\Temp\\5\\joblib_memmapping_folder_11132_7308949288 after 5 tentatives.\r\n  .format(folder_path, RM_SUBDIRS_N_RETRY))\r\nC:\\ProgramData\\Anaconda3\\lib\\site-packages\\joblib\\_memmapping_reducer.py:409: UserWarning: Failed to clean temporary folder: C:\\Users\\msrwinadm4\\AppData\\Local\\Temp\\5\\joblib_memmapping_folder_11132_7308949288\r\n  .format(pool_folder))\r\n\r\n```\r\n\r\n## Your Environment\r\n* Python version: 3.7.6 (Anaconda)\r\n* graspologic version: 0.1.0.dev331219603\r\n* Windows 2016 Datacenter (448 GB RAM) x64\r\n\r\n## Additional Details\r\ngraspologic==0.1.0.dev331219603\r\njoblib==0.14.1\r\nhyppo==0.1.3\r\nscikit-image==0.16.2\r\nscikit-learn==0.22.1\r\nscipy==1.4.1\r\nnumpy==1.18.1\r\n\r\n## Underlying problem:\r\nOlder versions of joblib have a known issue running on Windows.  See https://github.com/joblib/joblib/issues/806.  This appears to be fixed on May 3rd, 2020 by https://github.com/joblib/joblib/pull/966.\r\n\r\nHyppo uses joblib as a transitive dependency of scikit-learn but does not declare it as a dependency.  Scikit-learn only requires joblib 0.11 which does not include this fix.  See https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/_min_dependencies.py\r\n\n", "before_files": [{"content": "# Copyright (c) Microsoft Corporation and contributors.\n# Licensed under the MIT License.\n\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\n\nMINIMUM_PYTHON_VERSION = 3, 6  # Minimum of Python 3.6\n\nif sys.version_info < MINIMUM_PYTHON_VERSION:\n    sys.exit(\"Python {}.{}+ is required.\".format(*MINIMUM_PYTHON_VERSION))\n\nsys.path.insert(0, os.path.join(\"graspologic\", \"version\"))\nfrom version import version\n\nsys.path.pop(0)\n\nversion_path = os.path.join(\"graspologic\", \"version\", \"version.txt\")\nwith open(version_path, \"w\") as version_file:\n    version_file.write(f\"{version}\")\n\nwith open(\"README.md\", \"r\") as f:\n    LONG_DESCRIPTION = f.read()\n\nsetup(\n    name=\"graspologic\",\n    version=version,\n    description=\"A set of python modules for graph statistics\",\n    long_description=LONG_DESCRIPTION,\n    long_description_content_type=\"text/markdown\",\n    author=\"Eric Bridgeford, Jaewon Chung, Benjamin Pedigo, Bijan Varjavand\",\n    author_email=\"j1c@jhu.edu\",\n    maintainer=\"Dwayne Pryce\",\n    maintainer_email=\"dwpryce@microsoft.com\",\n    url=\"https://github.com/microsoft/graspologic\",\n    license=\"MIT\",\n    classifiers=[\n        \"Development Status :: 3 - Alpha\",\n        \"Intended Audience :: Science/Research\",\n        \"Topic :: Scientific/Engineering :: Mathematics\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n    packages=find_packages(exclude=[\"tests\", \"tests.*\", \"tests/*\"]),\n    include_package_data=True,\n    package_data={\"version\": [os.path.join(\"graspologic\", \"version\", \"version.txt\")]},\n    install_requires=[\n        \"anytree>=2.8.0\",\n        \"gensim\",\n        \"hyppo>=0.1.3\",\n        \"matplotlib>=3.0.0,<=3.3.0\",\n        \"networkx>=2.1\",\n        \"numpy>=1.8.1\",\n        \"POT>=0.7.0\",\n        \"seaborn>=0.9.0\",\n        \"scikit-learn>=0.19.1\",\n        \"scipy>=1.4.0\",\n    ],\n    extras_require={\n        \"dev\": [\n            \"black\",\n            \"ipykernel>=5.1.0\",\n            \"ipython>=7.4.0\",\n            \"mypy\",\n            \"nbsphinx\",\n            \"numpydoc\",\n            \"pandoc\",\n            \"pytest\",\n            \"pytest-cov\",\n            \"sphinx\",\n            \"sphinxcontrib-rawfiles\",\n            \"sphinx-rtd-theme\",\n            \"testfixtures\",\n        ]\n    },\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright (c) Microsoft Corporation and contributors.\n# Licensed under the MIT License.\n\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\n\nMINIMUM_PYTHON_VERSION = 3, 6  # Minimum of Python 3.6\n\nif sys.version_info < MINIMUM_PYTHON_VERSION:\n    sys.exit(\"Python {}.{}+ is required.\".format(*MINIMUM_PYTHON_VERSION))\n\nsys.path.insert(0, os.path.join(\"graspologic\", \"version\"))\nfrom version import version\n\nsys.path.pop(0)\n\nversion_path = os.path.join(\"graspologic\", \"version\", \"version.txt\")\nwith open(version_path, \"w\") as version_file:\n    version_file.write(f\"{version}\")\n\nwith open(\"README.md\", \"r\") as f:\n    LONG_DESCRIPTION = f.read()\n\nsetup(\n    name=\"graspologic\",\n    version=version,\n    description=\"A set of python modules for graph statistics\",\n    long_description=LONG_DESCRIPTION,\n    long_description_content_type=\"text/markdown\",\n    author=\"Eric Bridgeford, Jaewon Chung, Benjamin Pedigo, Bijan Varjavand\",\n    author_email=\"j1c@jhu.edu\",\n    maintainer=\"Dwayne Pryce\",\n    maintainer_email=\"dwpryce@microsoft.com\",\n    url=\"https://github.com/microsoft/graspologic\",\n    license=\"MIT\",\n    classifiers=[\n        \"Development Status :: 3 - Alpha\",\n        \"Intended Audience :: Science/Research\",\n        \"Topic :: Scientific/Engineering :: Mathematics\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n    packages=find_packages(exclude=[\"tests\", \"tests.*\", \"tests/*\"]),\n    include_package_data=True,\n    package_data={\"version\": [os.path.join(\"graspologic\", \"version\", \"version.txt\")]},\n    install_requires=[\n        \"anytree>=2.8.0\",\n        \"gensim\",\n        \"hyppo>=0.1.3\",\n        \"joblib>=0.17.0\", # Older versions of joblib cause issue #806.  Transitive dependency of hyppo.\n        \"matplotlib>=3.0.0,<=3.3.0\",\n        \"networkx>=2.1\",\n        \"numpy>=1.8.1\",\n        \"POT>=0.7.0\",\n        \"seaborn>=0.9.0\",\n        \"scikit-learn>=0.19.1\",\n        \"scipy>=1.4.0\",\n    ],\n    extras_require={\n        \"dev\": [\n            \"black\",\n            \"ipykernel>=5.1.0\",\n            \"ipython>=7.4.0\",\n            \"mypy\",\n            \"nbsphinx\",\n            \"numpydoc\",\n            \"pandoc\",\n            \"pytest\",\n            \"pytest-cov\",\n            \"sphinx\",\n            \"sphinxcontrib-rawfiles\",\n            \"sphinx-rtd-theme\",\n            \"testfixtures\",\n        ]\n    },\n)\n", "path": "setup.py"}]}