prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Examples are distributed as part of the package
  Hi, 
  
  I think the examples are folder are currently packaged as part of the package on PyPI. This means that installing haiku will also install the examples as the package `examples`. Should these be excluded from the distribution?
  
  JAX also has examples in their repo, but those are excluded from packaging in 
  
  https://github.com/google/jax/blob/main/setup.py#L33
  
  
  
  --- 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 2019 DeepMind Technologies Limited. All Rights Reserved.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 # ==============================================================================
  15 """Setup for pip package."""
  16 
  17 from setuptools import find_namespace_packages
  18 from setuptools import setup
  19 
  20 
  21 def _get_version():
  22   with open('haiku/__init__.py') as fp:
  23     for line in fp:
  24       if line.startswith('__version__'):
  25         g = {}
  26         exec(line, g)  # pylint: disable=exec-used
  27         return g['__version__']
  28     raise ValueError('`__version__` not defined in `haiku/__init__.py`')
  29 
  30 
  31 def _parse_requirements(requirements_txt_path):
  32   with open(requirements_txt_path) as fp:
  33     return fp.read().splitlines()
  34 
  35 
  36 _VERSION = _get_version()
  37 
  38 EXTRA_PACKAGES = {
  39     'jax': ['jax>=0.1.71'],
  40     'jaxlib': ['jaxlib>=0.1.49'],
  41 }
  42 
  43 setup(
  44     name='dm-haiku',
  45     version=_VERSION,
  46     url='https://github.com/deepmind/dm-haiku',
  47     license='Apache 2.0',
  48     author='DeepMind',
  49     description='Haiku is a library for building neural networks in JAX.',
  50     long_description=open('README.md').read(),
  51     long_description_content_type='text/markdown',
  52     author_email='haiku-dev-os@google.com',
  53     # Contained modules and scripts.
  54     packages=find_namespace_packages(exclude=['*_test.py']),
  55     install_requires=_parse_requirements('requirements.txt'),
  56     extras_require=EXTRA_PACKAGES,
  57     tests_require=_parse_requirements('requirements-test.txt'),
  58     requires_python='>=3.7',
  59     include_package_data=True,
  60     zip_safe=False,
  61     # PyPI package information.
  62     classifiers=[
  63         'Development Status :: 4 - Beta',
  64         'Intended Audience :: Developers',
  65         'Intended Audience :: Education',
  66         'Intended Audience :: Science/Research',
  67         'License :: OSI Approved :: Apache Software License',
  68         'Programming Language :: Python :: 3',
  69         'Programming Language :: Python :: 3.7',
  70         'Programming Language :: Python :: 3.8',
  71         'Topic :: Scientific/Engineering :: Mathematics',
  72         'Topic :: Software Development :: Libraries :: Python Modules',
  73         'Topic :: Software Development :: Libraries',
  74     ],
  75 )
  76
  ```
  --- 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
  @@ -51,7 +51,7 @@
       long_description_content_type='text/markdown',
       author_email='haiku-dev-os@google.com',
       # Contained modules and scripts.
  -    packages=find_namespace_packages(exclude=['*_test.py']),
  +    packages=find_namespace_packages(exclude=['*_test.py', 'examples']),
       install_requires=_parse_requirements('requirements.txt'),
       extras_require=EXTRA_PACKAGES,
       tests_require=_parse_requirements('requirements-test.txt'),
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -51,7 +51,7 @@\n     long_description_content_type='text/markdown',\n     author_email='haiku-dev-os@google.com',\n     # Contained modules and scripts.\n-    packages=find_namespace_packages(exclude=['*_test.py']),\n+    packages=find_namespace_packages(exclude=['*_test.py', 'examples']),\n     install_requires=_parse_requirements('requirements.txt'),\n     extras_require=EXTRA_PACKAGES,\n     tests_require=_parse_requirements('requirements-test.txt'),\n", "issue": "Examples are distributed as part of the package\nHi, \r\n\r\nI think the examples are folder are currently packaged as part of the package on PyPI. This means that installing haiku will also install the examples as the package `examples`. Should these be excluded from the distribution?\r\n\r\nJAX also has examples in their repo, but those are excluded from packaging in \r\n\r\nhttps://github.com/google/jax/blob/main/setup.py#L33\r\n\r\n\n", "before_files": [{"content": "# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.\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\"\"\"Setup for pip package.\"\"\"\n\nfrom setuptools import find_namespace_packages\nfrom setuptools import setup\n\n\ndef _get_version():\n  with open('haiku/__init__.py') as fp:\n    for line in fp:\n      if line.startswith('__version__'):\n        g = {}\n        exec(line, g)  # pylint: disable=exec-used\n        return g['__version__']\n    raise ValueError('`__version__` not defined in `haiku/__init__.py`')\n\n\ndef _parse_requirements(requirements_txt_path):\n  with open(requirements_txt_path) as fp:\n    return fp.read().splitlines()\n\n\n_VERSION = _get_version()\n\nEXTRA_PACKAGES = {\n    'jax': ['jax>=0.1.71'],\n    'jaxlib': ['jaxlib>=0.1.49'],\n}\n\nsetup(\n    name='dm-haiku',\n    version=_VERSION,\n    url='https://github.com/deepmind/dm-haiku',\n    license='Apache 2.0',\n    author='DeepMind',\n    description='Haiku is a library for building neural networks in JAX.',\n    long_description=open('README.md').read(),\n    long_description_content_type='text/markdown',\n    author_email='haiku-dev-os@google.com',\n    # Contained modules and scripts.\n    packages=find_namespace_packages(exclude=['*_test.py']),\n    install_requires=_parse_requirements('requirements.txt'),\n    extras_require=EXTRA_PACKAGES,\n    tests_require=_parse_requirements('requirements-test.txt'),\n    requires_python='>=3.7',\n    include_package_data=True,\n    zip_safe=False,\n    # PyPI package information.\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Topic :: Scientific/Engineering :: Mathematics',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: Software Development :: Libraries',\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.\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\"\"\"Setup for pip package.\"\"\"\n\nfrom setuptools import find_namespace_packages\nfrom setuptools import setup\n\n\ndef _get_version():\n  with open('haiku/__init__.py') as fp:\n    for line in fp:\n      if line.startswith('__version__'):\n        g = {}\n        exec(line, g)  # pylint: disable=exec-used\n        return g['__version__']\n    raise ValueError('`__version__` not defined in `haiku/__init__.py`')\n\n\ndef _parse_requirements(requirements_txt_path):\n  with open(requirements_txt_path) as fp:\n    return fp.read().splitlines()\n\n\n_VERSION = _get_version()\n\nEXTRA_PACKAGES = {\n    'jax': ['jax>=0.1.71'],\n    'jaxlib': ['jaxlib>=0.1.49'],\n}\n\nsetup(\n    name='dm-haiku',\n    version=_VERSION,\n    url='https://github.com/deepmind/dm-haiku',\n    license='Apache 2.0',\n    author='DeepMind',\n    description='Haiku is a library for building neural networks in JAX.',\n    long_description=open('README.md').read(),\n    long_description_content_type='text/markdown',\n    author_email='haiku-dev-os@google.com',\n    # Contained modules and scripts.\n    packages=find_namespace_packages(exclude=['*_test.py', 'examples']),\n    install_requires=_parse_requirements('requirements.txt'),\n    extras_require=EXTRA_PACKAGES,\n    tests_require=_parse_requirements('requirements-test.txt'),\n    requires_python='>=3.7',\n    include_package_data=True,\n    zip_safe=False,\n    # PyPI package information.\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Topic :: Scientific/Engineering :: Mathematics',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: Software Development :: Libraries',\n    ],\n)\n", "path": "setup.py"}]}