prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Switch from pillow to pillow-simd
  This attempts to fix some `pillow`-`torchvision` breakage blocking #2239 by switching to the alternative torchvision-recommended library `pillow-simd`.
  
  --- 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) 2017-2019 Uber Technologies, Inc.
  2 # SPDX-License-Identifier: Apache-2.0
  3 
  4 import os
  5 import subprocess
  6 import sys
  7 
  8 from setuptools import find_packages, setup
  9 
  10 PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
  11 VERSION = """
  12 # This file is auto-generated with the version information during setup.py installation.
  13 
  14 __version__ = '{}'
  15 """
  16 
  17 # Find pyro version.
  18 for line in open(os.path.join(PROJECT_PATH, 'pyro', '__init__.py')):
  19     if line.startswith('version_prefix = '):
  20         version = line.strip().split()[2][1:-1]
  21 
  22 # Append current commit sha to version
  23 commit_sha = ''
  24 try:
  25     current_tag = subprocess.check_output(['git', 'tag', '--points-at', 'HEAD'],
  26                                           cwd=PROJECT_PATH).decode('ascii').strip()
  27     # only add sha if HEAD does not point to the release tag
  28     if not current_tag == version:
  29         commit_sha = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'],
  30                                              cwd=PROJECT_PATH).decode('ascii').strip()
  31 # catch all exception to be safe
  32 except Exception:
  33     pass  # probably not a git repo
  34 
  35 # Write version to _version.py
  36 if commit_sha:
  37     version += '+{}'.format(commit_sha)
  38 with open(os.path.join(PROJECT_PATH, 'pyro', '_version.py'), 'w') as f:
  39     f.write(VERSION.format(version))
  40 
  41 
  42 # READ README.md for long description on PyPi.
  43 # This requires uploading via twine, e.g.:
  44 # $ python setup.py sdist bdist_wheel
  45 # $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*  # test version
  46 # $ twine upload dist/*
  47 try:
  48     long_description = open('README.md', encoding='utf-8').read()
  49 except Exception as e:
  50     sys.stderr.write('Failed to read README.md\n'.format(e))
  51     sys.stderr.flush()
  52     long_description = ''
  53 
  54 # Remove badges since they will always be obsolete.
  55 # This assumes the first 12 lines contain badge info.
  56 long_description = '\n'.join([str(line) for line in long_description.split('\n')[12:]])
  57 
  58 # examples/tutorials
  59 EXTRAS_REQUIRE = [
  60     'jupyter>=1.0.0',
  61     'graphviz>=0.8',
  62     'matplotlib>=1.3',
  63     'pillow-simd',
  64     'torchvision>=0.5.0',
  65     'visdom>=0.1.4',
  66     'pandas',
  67     'seaborn',
  68     'wget',
  69 ]
  70 
  71 setup(
  72     name='pyro-ppl',
  73     version=version,
  74     description='A Python library for probabilistic modeling and inference',
  75     long_description=long_description,
  76     long_description_content_type='text/markdown',
  77     packages=find_packages(include=['pyro', 'pyro.*']),
  78     package_data={"pyro.distributions": ["*.cpp"]},
  79     url='http://pyro.ai',
  80     author='Uber AI Labs',
  81     author_email='pyro@uber.com',
  82     install_requires=[
  83         # if you add any additional libraries, please also
  84         # add them to `docs/requirements.txt`
  85         # numpy is necessary for some functionality of PyTorch
  86         'numpy>=1.7',
  87         'opt_einsum>=2.3.2',
  88         'pyro-api>=0.1.1',
  89         'torch>=1.4.0',
  90         'tqdm>=4.36',
  91     ],
  92     extras_require={
  93         'extras': EXTRAS_REQUIRE,
  94         'test': EXTRAS_REQUIRE + [
  95             'nbval',
  96             'pytest>=4.1',
  97             'pytest-cov',
  98             'scipy>=1.1',
  99         ],
  100         'profile': ['prettytable', 'pytest-benchmark', 'snakeviz'],
  101         'dev': EXTRAS_REQUIRE + [
  102             'flake8',
  103             'isort',
  104             'nbformat',
  105             'nbsphinx>=0.3.2',
  106             'nbstripout',
  107             'nbval',
  108             'ninja',
  109             'pypandoc',
  110             'pytest>=4.1',
  111             'pytest-xdist',
  112             'scipy>=1.1',
  113             'sphinx',
  114             'sphinx_rtd_theme',
  115             'yapf',
  116         ],
  117     },
  118     python_requires='>=3.5',
  119     keywords='machine learning statistics probabilistic programming bayesian modeling pytorch',
  120     license='Apache 2.0',
  121     classifiers=[
  122         'Intended Audience :: Developers',
  123         'Intended Audience :: Education',
  124         'Intended Audience :: Science/Research',
  125         'Operating System :: POSIX :: Linux',
  126         'Operating System :: MacOS :: MacOS X',
  127         'Programming Language :: Python :: 3.5',
  128         'Programming Language :: Python :: 3.6',
  129         'Programming Language :: Python :: 3.7',
  130     ],
  131     # yapf
  132 )
  133
  ```
  --- 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/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -60,7 +60,6 @@
       'jupyter>=1.0.0',
       'graphviz>=0.8',
       'matplotlib>=1.3',
  -    'pillow-simd',
       'torchvision>=0.5.0',
       'visdom>=0.1.4',
       'pandas',
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -60,7 +60,6 @@\n     'jupyter>=1.0.0',\n     'graphviz>=0.8',\n     'matplotlib>=1.3',\n-    'pillow-simd',\n     'torchvision>=0.5.0',\n     'visdom>=0.1.4',\n     'pandas',\n", "issue": "Switch from pillow to pillow-simd\nThis attempts to fix some `pillow`-`torchvision` breakage blocking #2239 by switching to the alternative torchvision-recommended library `pillow-simd`.\n", "before_files": [{"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\nimport subprocess\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\nVERSION = \"\"\"\n# This file is auto-generated with the version information during setup.py installation.\n\n__version__ = '{}'\n\"\"\"\n\n# Find pyro version.\nfor line in open(os.path.join(PROJECT_PATH, 'pyro', '__init__.py')):\n    if line.startswith('version_prefix = '):\n        version = line.strip().split()[2][1:-1]\n\n# Append current commit sha to version\ncommit_sha = ''\ntry:\n    current_tag = subprocess.check_output(['git', 'tag', '--points-at', 'HEAD'],\n                                          cwd=PROJECT_PATH).decode('ascii').strip()\n    # only add sha if HEAD does not point to the release tag\n    if not current_tag == version:\n        commit_sha = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'],\n                                             cwd=PROJECT_PATH).decode('ascii').strip()\n# catch all exception to be safe\nexcept Exception:\n    pass  # probably not a git repo\n\n# Write version to _version.py\nif commit_sha:\n    version += '+{}'.format(commit_sha)\nwith open(os.path.join(PROJECT_PATH, 'pyro', '_version.py'), 'w') as f:\n    f.write(VERSION.format(version))\n\n\n# READ README.md for long description on PyPi.\n# This requires uploading via twine, e.g.:\n# $ python setup.py sdist bdist_wheel\n# $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*  # test version\n# $ twine upload dist/*\ntry:\n    long_description = open('README.md', encoding='utf-8').read()\nexcept Exception as e:\n    sys.stderr.write('Failed to read README.md\\n'.format(e))\n    sys.stderr.flush()\n    long_description = ''\n\n# Remove badges since they will always be obsolete.\n# This assumes the first 12 lines contain badge info.\nlong_description = '\\n'.join([str(line) for line in long_description.split('\\n')[12:]])\n\n# examples/tutorials\nEXTRAS_REQUIRE = [\n    'jupyter>=1.0.0',\n    'graphviz>=0.8',\n    'matplotlib>=1.3',\n    'pillow-simd',\n    'torchvision>=0.5.0',\n    'visdom>=0.1.4',\n    'pandas',\n    'seaborn',\n    'wget',\n]\n\nsetup(\n    name='pyro-ppl',\n    version=version,\n    description='A Python library for probabilistic modeling and inference',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    packages=find_packages(include=['pyro', 'pyro.*']),\n    package_data={\"pyro.distributions\": [\"*.cpp\"]},\n    url='http://pyro.ai',\n    author='Uber AI Labs',\n    author_email='pyro@uber.com',\n    install_requires=[\n        # if you add any additional libraries, please also\n        # add them to `docs/requirements.txt`\n        # numpy is necessary for some functionality of PyTorch\n        'numpy>=1.7',\n        'opt_einsum>=2.3.2',\n        'pyro-api>=0.1.1',\n        'torch>=1.4.0',\n        'tqdm>=4.36',\n    ],\n    extras_require={\n        'extras': EXTRAS_REQUIRE,\n        'test': EXTRAS_REQUIRE + [\n            'nbval',\n            'pytest>=4.1',\n            'pytest-cov',\n            'scipy>=1.1',\n        ],\n        'profile': ['prettytable', 'pytest-benchmark', 'snakeviz'],\n        'dev': EXTRAS_REQUIRE + [\n            'flake8',\n            'isort',\n            'nbformat',\n            'nbsphinx>=0.3.2',\n            'nbstripout',\n            'nbval',\n            'ninja',\n            'pypandoc',\n            'pytest>=4.1',\n            'pytest-xdist',\n            'scipy>=1.1',\n            'sphinx',\n            'sphinx_rtd_theme',\n            'yapf',\n        ],\n    },\n    python_requires='>=3.5',\n    keywords='machine learning statistics probabilistic programming bayesian modeling pytorch',\n    license='Apache 2.0',\n    classifiers=[\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'Operating System :: POSIX :: Linux',\n        'Operating System :: MacOS :: MacOS X',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n    ],\n    # yapf\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\nimport subprocess\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\nVERSION = \"\"\"\n# This file is auto-generated with the version information during setup.py installation.\n\n__version__ = '{}'\n\"\"\"\n\n# Find pyro version.\nfor line in open(os.path.join(PROJECT_PATH, 'pyro', '__init__.py')):\n    if line.startswith('version_prefix = '):\n        version = line.strip().split()[2][1:-1]\n\n# Append current commit sha to version\ncommit_sha = ''\ntry:\n    current_tag = subprocess.check_output(['git', 'tag', '--points-at', 'HEAD'],\n                                          cwd=PROJECT_PATH).decode('ascii').strip()\n    # only add sha if HEAD does not point to the release tag\n    if not current_tag == version:\n        commit_sha = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'],\n                                             cwd=PROJECT_PATH).decode('ascii').strip()\n# catch all exception to be safe\nexcept Exception:\n    pass  # probably not a git repo\n\n# Write version to _version.py\nif commit_sha:\n    version += '+{}'.format(commit_sha)\nwith open(os.path.join(PROJECT_PATH, 'pyro', '_version.py'), 'w') as f:\n    f.write(VERSION.format(version))\n\n\n# READ README.md for long description on PyPi.\n# This requires uploading via twine, e.g.:\n# $ python setup.py sdist bdist_wheel\n# $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*  # test version\n# $ twine upload dist/*\ntry:\n    long_description = open('README.md', encoding='utf-8').read()\nexcept Exception as e:\n    sys.stderr.write('Failed to read README.md\\n'.format(e))\n    sys.stderr.flush()\n    long_description = ''\n\n# Remove badges since they will always be obsolete.\n# This assumes the first 12 lines contain badge info.\nlong_description = '\\n'.join([str(line) for line in long_description.split('\\n')[12:]])\n\n# examples/tutorials\nEXTRAS_REQUIRE = [\n    'jupyter>=1.0.0',\n    'graphviz>=0.8',\n    'matplotlib>=1.3',\n    'torchvision>=0.5.0',\n    'visdom>=0.1.4',\n    'pandas',\n    'seaborn',\n    'wget',\n]\n\nsetup(\n    name='pyro-ppl',\n    version=version,\n    description='A Python library for probabilistic modeling and inference',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    packages=find_packages(include=['pyro', 'pyro.*']),\n    package_data={\"pyro.distributions\": [\"*.cpp\"]},\n    url='http://pyro.ai',\n    author='Uber AI Labs',\n    author_email='pyro@uber.com',\n    install_requires=[\n        # if you add any additional libraries, please also\n        # add them to `docs/requirements.txt`\n        # numpy is necessary for some functionality of PyTorch\n        'numpy>=1.7',\n        'opt_einsum>=2.3.2',\n        'pyro-api>=0.1.1',\n        'torch>=1.4.0',\n        'tqdm>=4.36',\n    ],\n    extras_require={\n        'extras': EXTRAS_REQUIRE,\n        'test': EXTRAS_REQUIRE + [\n            'nbval',\n            'pytest>=4.1',\n            'pytest-cov',\n            'scipy>=1.1',\n        ],\n        'profile': ['prettytable', 'pytest-benchmark', 'snakeviz'],\n        'dev': EXTRAS_REQUIRE + [\n            'flake8',\n            'isort',\n            'nbformat',\n            'nbsphinx>=0.3.2',\n            'nbstripout',\n            'nbval',\n            'ninja',\n            'pypandoc',\n            'pytest>=4.1',\n            'pytest-xdist',\n            'scipy>=1.1',\n            'sphinx',\n            'sphinx_rtd_theme',\n            'yapf',\n        ],\n    },\n    python_requires='>=3.5',\n    keywords='machine learning statistics probabilistic programming bayesian modeling pytorch',\n    license='Apache 2.0',\n    classifiers=[\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'Operating System :: POSIX :: Linux',\n        'Operating System :: MacOS :: MacOS X',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n    ],\n    # yapf\n)\n", "path": "setup.py"}]}