prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  test_mask_reducer failing on circle CI
  testing the mask reducer from nilearn.decompositions.base sometimes fails on circleCI, e.g.
  https://travis-ci.org/nilearn/nilearn/builds/583674961?utm_source=github_status&utm_medium=notification
  
  the process gets a SIGABRT
  
  could be due to the recent unvendoring of joblib, although this error started more recently
  
  so far I haven't been able to reproduce this locally
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `nilearn/__init__.py`
  Content:
  ```
  1 """
  2 Machine Learning module for NeuroImaging in python
  3 --------------------------------------------------
  4 
  5 Documentation is available in the docstrings and online at
  6 http://nilearn.github.io.
  7 
  8 Contents
  9 --------
  10 Nilearn aims at simplifying the use of the scikit-learn package in the context of
  11 neuroimaging. It provides specific input/output functions, algorithms and
  12 visualization tools.
  13 
  14 Submodules
  15 ---------
  16 datasets                --- Utilities to download NeuroImaging datasets
  17 decoding                --- Decoding tools and algorithms
  18 decomposition           --- Includes a subject level variant of the ICA
  19                             algorithm called Canonical ICA
  20 connectome              --- Set of tools for computing functional connectivity matrices
  21                             and for sparse multi-subjects learning of Gaussian graphical models
  22 image                   --- Set of functions defining mathematical operations
  23                             working on Niimg-like objects
  24 input_data              --- includes scikit-learn tranformers and tools to
  25                             preprocess neuro-imaging data
  26 masking                 --- Utilities to compute and operate on brain masks
  27 mass_univariate         --- Defines a Massively Univariate Linear Model
  28                             estimated with OLS and permutation test
  29 plotting                --- Plotting code for nilearn
  30 region                  --- Set of functions for extracting region-defined
  31                             signals, clustering methods, connected regions extraction
  32 signal                  --- Set of preprocessing functions for time series
  33 """
  34 
  35 import gzip
  36 import sys
  37 import warnings
  38 
  39 from distutils.version import LooseVersion
  40 
  41 from .version import _check_module_dependencies, __version__
  42 
  43 
  44 def _py2_deprecation_warning():
  45     py2_warning = ('Python2 support is deprecated and will be removed in '
  46                    'the next release. Consider switching to Python 3.6 or 3.7.'
  47                    )
  48     warnings.filterwarnings('once', message=py2_warning)
  49     warnings.warn(message=py2_warning,
  50                   category=DeprecationWarning,
  51                   stacklevel=3,
  52                   )
  53 
  54 def _py34_deprecation_warning():
  55     py34_warning = ('Python 3.4 support is deprecated and will be removed in '
  56                    'the next release. Consider switching to Python 3.6 or 3.7.'
  57                    )
  58     warnings.filterwarnings('once', message=py34_warning)
  59     warnings.warn(message=py34_warning,
  60                   category=DeprecationWarning,
  61                   stacklevel=3,
  62                   )
  63 
  64 
  65 def _python_deprecation_warnings():
  66     if sys.version_info.major == 2:
  67         _py2_deprecation_warning()
  68     elif sys.version_info.major == 3 and sys.version_info.minor == 4:
  69         _py34_deprecation_warning()
  70 
  71 
  72 _check_module_dependencies()
  73 _python_deprecation_warnings()
  74 
  75 # Temporary work around to address formatting issues in doc tests
  76 # with NumPy 1.14. NumPy had made more consistent str/repr formatting
  77 # of numpy arrays. Hence we print the options to old versions.
  78 import numpy as np
  79 if LooseVersion(np.__version__) >= LooseVersion("1.14"):
  80     # See issue #1600 in nilearn for reason to add try and except
  81     try:
  82         from ._utils.testing import is_nose_running
  83         if is_nose_running():
  84             np.set_printoptions(legacy='1.13')
  85     except ImportError:
  86         pass
  87 
  88 # Monkey-patch gzip to have faster reads on large gzip files
  89 if hasattr(gzip.GzipFile, 'max_read_chunk'):
  90     gzip.GzipFile.max_read_chunk = 100 * 1024 * 1024  # 100Mb
  91 
  92 # Boolean controlling the default globbing technique when using check_niimg
  93 # and the os.path.expanduser usage in CacheMixin.
  94 # Default value it True, set it to False to completely deactivate this
  95 # behavior.
  96 EXPAND_PATH_WILDCARDS = True
  97 
  98 # Boolean controlling whether the joblib caches should be
  99 # flushed if the version of certain modules changes (eg nibabel, as it
  100 # does not respect the backward compatibility in some of its internal
  101 # structures
  102 # This  is used in nilearn._utils.cache_mixin
  103 CHECK_CACHE_VERSION = True
  104 
  105 # list all submodules available in nilearn and version
  106 __all__ = ['datasets', 'decoding', 'decomposition', 'connectome',
  107            'image', 'input_data', 'masking', 'mass_univariate', 'plotting',
  108            'region', 'signal', 'surface', 'parcellations', '__version__']
  109 
  110
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/nilearn/__init__.py b/nilearn/__init__.py
  --- a/nilearn/__init__.py
  +++ b/nilearn/__init__.py
  @@ -35,11 +35,17 @@
   import gzip
   import sys
   import warnings
  +import os
   
   from distutils.version import LooseVersion
   
   from .version import _check_module_dependencies, __version__
   
  +# Workaround issue discovered in intel-openmp 2019.5:
  +# https://github.com/ContinuumIO/anaconda-issues/issues/11294
  +#
  +# see also https://github.com/scikit-learn/scikit-learn/pull/15020
  +os.environ.setdefault("KMP_INIT_AT_FORK", "FALSE")
   
   def _py2_deprecation_warning():
       py2_warning = ('Python2 support is deprecated and will be removed in '
  
verification_info: {"golden_diff": "diff --git a/nilearn/__init__.py b/nilearn/__init__.py\n--- a/nilearn/__init__.py\n+++ b/nilearn/__init__.py\n@@ -35,11 +35,17 @@\n import gzip\n import sys\n import warnings\n+import os\n \n from distutils.version import LooseVersion\n \n from .version import _check_module_dependencies, __version__\n \n+# Workaround issue discovered in intel-openmp 2019.5:\n+# https://github.com/ContinuumIO/anaconda-issues/issues/11294\n+#\n+# see also https://github.com/scikit-learn/scikit-learn/pull/15020\n+os.environ.setdefault(\"KMP_INIT_AT_FORK\", \"FALSE\")\n \n def _py2_deprecation_warning():\n     py2_warning = ('Python2 support is deprecated and will be removed in '\n", "issue": "test_mask_reducer failing on circle CI\ntesting the mask reducer from nilearn.decompositions.base sometimes fails on circleCI, e.g.\r\nhttps://travis-ci.org/nilearn/nilearn/builds/583674961?utm_source=github_status&utm_medium=notification\r\n\r\nthe process gets a SIGABRT\r\n\r\ncould be due to the recent unvendoring of joblib, although this error started more recently\r\n\r\nso far I haven't been able to reproduce this locally\n", "before_files": [{"content": "\"\"\"\nMachine Learning module for NeuroImaging in python\n--------------------------------------------------\n\nDocumentation is available in the docstrings and online at\nhttp://nilearn.github.io.\n\nContents\n--------\nNilearn aims at simplifying the use of the scikit-learn package in the context of\nneuroimaging. It provides specific input/output functions, algorithms and\nvisualization tools.\n\nSubmodules\n---------\ndatasets                --- Utilities to download NeuroImaging datasets\ndecoding                --- Decoding tools and algorithms\ndecomposition           --- Includes a subject level variant of the ICA\n                            algorithm called Canonical ICA\nconnectome              --- Set of tools for computing functional connectivity matrices\n                            and for sparse multi-subjects learning of Gaussian graphical models\nimage                   --- Set of functions defining mathematical operations\n                            working on Niimg-like objects\ninput_data              --- includes scikit-learn tranformers and tools to\n                            preprocess neuro-imaging data\nmasking                 --- Utilities to compute and operate on brain masks\nmass_univariate         --- Defines a Massively Univariate Linear Model\n                            estimated with OLS and permutation test\nplotting                --- Plotting code for nilearn\nregion                  --- Set of functions for extracting region-defined\n                            signals, clustering methods, connected regions extraction\nsignal                  --- Set of preprocessing functions for time series\n\"\"\"\n\nimport gzip\nimport sys\nimport warnings\n\nfrom distutils.version import LooseVersion\n\nfrom .version import _check_module_dependencies, __version__\n\n\ndef _py2_deprecation_warning():\n    py2_warning = ('Python2 support is deprecated and will be removed in '\n                   'the next release. Consider switching to Python 3.6 or 3.7.'\n                   )\n    warnings.filterwarnings('once', message=py2_warning)\n    warnings.warn(message=py2_warning,\n                  category=DeprecationWarning,\n                  stacklevel=3,\n                  )\n\ndef _py34_deprecation_warning():\n    py34_warning = ('Python 3.4 support is deprecated and will be removed in '\n                   'the next release. Consider switching to Python 3.6 or 3.7.'\n                   )\n    warnings.filterwarnings('once', message=py34_warning)\n    warnings.warn(message=py34_warning,\n                  category=DeprecationWarning,\n                  stacklevel=3,\n                  )\n\n\ndef _python_deprecation_warnings():\n    if sys.version_info.major == 2:\n        _py2_deprecation_warning()\n    elif sys.version_info.major == 3 and sys.version_info.minor == 4:\n        _py34_deprecation_warning()\n\n\n_check_module_dependencies()\n_python_deprecation_warnings()\n\n# Temporary work around to address formatting issues in doc tests\n# with NumPy 1.14. NumPy had made more consistent str/repr formatting\n# of numpy arrays. Hence we print the options to old versions.\nimport numpy as np\nif LooseVersion(np.__version__) >= LooseVersion(\"1.14\"):\n    # See issue #1600 in nilearn for reason to add try and except\n    try:\n        from ._utils.testing import is_nose_running\n        if is_nose_running():\n            np.set_printoptions(legacy='1.13')\n    except ImportError:\n        pass\n\n# Monkey-patch gzip to have faster reads on large gzip files\nif hasattr(gzip.GzipFile, 'max_read_chunk'):\n    gzip.GzipFile.max_read_chunk = 100 * 1024 * 1024  # 100Mb\n\n# Boolean controlling the default globbing technique when using check_niimg\n# and the os.path.expanduser usage in CacheMixin.\n# Default value it True, set it to False to completely deactivate this\n# behavior.\nEXPAND_PATH_WILDCARDS = True\n\n# Boolean controlling whether the joblib caches should be\n# flushed if the version of certain modules changes (eg nibabel, as it\n# does not respect the backward compatibility in some of its internal\n# structures\n# This  is used in nilearn._utils.cache_mixin\nCHECK_CACHE_VERSION = True\n\n# list all submodules available in nilearn and version\n__all__ = ['datasets', 'decoding', 'decomposition', 'connectome',\n           'image', 'input_data', 'masking', 'mass_univariate', 'plotting',\n           'region', 'signal', 'surface', 'parcellations', '__version__']\n\n", "path": "nilearn/__init__.py"}], "after_files": [{"content": "\"\"\"\nMachine Learning module for NeuroImaging in python\n--------------------------------------------------\n\nDocumentation is available in the docstrings and online at\nhttp://nilearn.github.io.\n\nContents\n--------\nNilearn aims at simplifying the use of the scikit-learn package in the context of\nneuroimaging. It provides specific input/output functions, algorithms and\nvisualization tools.\n\nSubmodules\n---------\ndatasets                --- Utilities to download NeuroImaging datasets\ndecoding                --- Decoding tools and algorithms\ndecomposition           --- Includes a subject level variant of the ICA\n                            algorithm called Canonical ICA\nconnectome              --- Set of tools for computing functional connectivity matrices\n                            and for sparse multi-subjects learning of Gaussian graphical models\nimage                   --- Set of functions defining mathematical operations\n                            working on Niimg-like objects\ninput_data              --- includes scikit-learn tranformers and tools to\n                            preprocess neuro-imaging data\nmasking                 --- Utilities to compute and operate on brain masks\nmass_univariate         --- Defines a Massively Univariate Linear Model\n                            estimated with OLS and permutation test\nplotting                --- Plotting code for nilearn\nregion                  --- Set of functions for extracting region-defined\n                            signals, clustering methods, connected regions extraction\nsignal                  --- Set of preprocessing functions for time series\n\"\"\"\n\nimport gzip\nimport sys\nimport warnings\nimport os\n\nfrom distutils.version import LooseVersion\n\nfrom .version import _check_module_dependencies, __version__\n\n# Workaround issue discovered in intel-openmp 2019.5:\n# https://github.com/ContinuumIO/anaconda-issues/issues/11294\n#\n# see also https://github.com/scikit-learn/scikit-learn/pull/15020\nos.environ.setdefault(\"KMP_INIT_AT_FORK\", \"FALSE\")\n\ndef _py2_deprecation_warning():\n    py2_warning = ('Python2 support is deprecated and will be removed in '\n                   'the next release. Consider switching to Python 3.6 or 3.7.'\n                   )\n    warnings.filterwarnings('once', message=py2_warning)\n    warnings.warn(message=py2_warning,\n                  category=DeprecationWarning,\n                  stacklevel=3,\n                  )\n\ndef _py34_deprecation_warning():\n    py34_warning = ('Python 3.4 support is deprecated and will be removed in '\n                   'the next release. Consider switching to Python 3.6 or 3.7.'\n                   )\n    warnings.filterwarnings('once', message=py34_warning)\n    warnings.warn(message=py34_warning,\n                  category=DeprecationWarning,\n                  stacklevel=3,\n                  )\n\n\ndef _python_deprecation_warnings():\n    if sys.version_info.major == 2:\n        _py2_deprecation_warning()\n    elif sys.version_info.major == 3 and sys.version_info.minor == 4:\n        _py34_deprecation_warning()\n\n\n_check_module_dependencies()\n_python_deprecation_warnings()\n\n# Temporary work around to address formatting issues in doc tests\n# with NumPy 1.14. NumPy had made more consistent str/repr formatting\n# of numpy arrays. Hence we print the options to old versions.\nimport numpy as np\nif LooseVersion(np.__version__) >= LooseVersion(\"1.14\"):\n    # See issue #1600 in nilearn for reason to add try and except\n    try:\n        from ._utils.testing import is_nose_running\n        if is_nose_running():\n            np.set_printoptions(legacy='1.13')\n    except ImportError:\n        pass\n\n# Monkey-patch gzip to have faster reads on large gzip files\nif hasattr(gzip.GzipFile, 'max_read_chunk'):\n    gzip.GzipFile.max_read_chunk = 100 * 1024 * 1024  # 100Mb\n\n# Boolean controlling the default globbing technique when using check_niimg\n# and the os.path.expanduser usage in CacheMixin.\n# Default value it True, set it to False to completely deactivate this\n# behavior.\nEXPAND_PATH_WILDCARDS = True\n\n# Boolean controlling whether the joblib caches should be\n# flushed if the version of certain modules changes (eg nibabel, as it\n# does not respect the backward compatibility in some of its internal\n# structures\n# This  is used in nilearn._utils.cache_mixin\nCHECK_CACHE_VERSION = True\n\n# list all submodules available in nilearn and version\n__all__ = ['datasets', 'decoding', 'decomposition', 'connectome',\n           'image', 'input_data', 'masking', 'mass_univariate', 'plotting',\n           'region', 'signal', 'surface', 'parcellations', '__version__']\n\n", "path": "nilearn/__init__.py"}]}