We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add warning if dependencies are not met
There should be a warning if one of the following dependencies is not met:
- scikit-learn==0.17
- smac==0.0.1
- lockfile>=0.10
- ConfigSpace>=0.2.1
- pyrfr==0.2.1


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `autosklearn/util/dependencies.py`
Content:
```
1 from warnings import warn
2 
3 import pkg_resources
4 import re
5 
6 from distutils.version import LooseVersion
7 
8 
9 RE_PATTERN = re.compile('^(?P<name>[\w\-]+)((?P<operation>==|>=|>)(?P<version>(\d+\.)?(\d+\.)?(\d+)))?$')
10 
11 
12 def verify_packages(packages):
13     if not packages:
14         return
15     if isinstance(packages, str):
16         packages = packages.splitlines()
17 
18     for package in packages:
19         if not package:
20             continue
21 
22         match = RE_PATTERN.match(package)
23         if match:
24             name = match.group('name')
25             operation = match.group('operation')
26             version = match.group('version')
27             _verify_package(name, operation, version)
28         else:
29             raise ValueError('Unable to read requirement: %s' % package)
30 
31 
32 def _verify_package(name, operation, version):
33     try:
34         module = pkg_resources.get_distribution(name)
35     except pkg_resources.DistributionNotFound:
36         raise MissingPackageError(name) from None
37 
38     if not operation:
39         return
40 
41     required_version = LooseVersion(version)
42     installed_version = LooseVersion(module.version)
43 
44     if operation == '==':
45         check = required_version == installed_version
46     elif operation == '>':
47         check = installed_version > required_version
48     elif operation == '>=':
49         check = installed_version > required_version or \
50                 installed_version == required_version
51     else:
52         raise NotImplementedError('operation \'%s\' is not supported' % operation)
53     if not check:
54         raise IncorrectPackageVersionError(name, installed_version, operation, required_version)
55 
56 
57 class MissingPackageError(Exception):
58 
59     error_message = 'mandatory package \'{name}\' not found'
60 
61     def __init__(self, package_name):
62         self.package_name = package_name
63         super(MissingPackageError, self).__init__(self.error_message.format(name=package_name))
64 
65 
66 class IncorrectPackageVersionError(Exception):
67 
68     error_message = '\'{name} {installed_version}\' version mismatch ({operation}{required_version})'
69 
70     def __init__(self, package_name, installed_version, operation, required_version):
71         self.package_name = package_name
72         self.installed_version = installed_version
73         self.operation = operation
74         self.required_version = required_version
75         message = self.error_message.format(name=package_name,
76                                             installed_version=installed_version,
77                                             operation=operation,
78                                             required_version=required_version)
79         super(IncorrectPackageVersionError, self).__init__(message)
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/autosklearn/util/dependencies.py b/autosklearn/util/dependencies.py
--- a/autosklearn/util/dependencies.py
+++ b/autosklearn/util/dependencies.py
@@ -33,7 +33,7 @@
     try:
         module = pkg_resources.get_distribution(name)
     except pkg_resources.DistributionNotFound:
-        raise MissingPackageError(name) from None
+        raise MissingPackageError(name)
 
     if not operation:
         return

{"golden_diff": "diff --git a/autosklearn/util/dependencies.py b/autosklearn/util/dependencies.py\n--- a/autosklearn/util/dependencies.py\n+++ b/autosklearn/util/dependencies.py\n@@ -33,7 +33,7 @@\n     try:\n         module = pkg_resources.get_distribution(name)\n     except pkg_resources.DistributionNotFound:\n-        raise MissingPackageError(name) from None\n+        raise MissingPackageError(name)\n \n     if not operation:\n         return\n", "issue": "Add warning if dependencies are not met\nThere should be a warning if one of the following dependencies is not met:\r\n- scikit-learn==0.17\r\n- smac==0.0.1\r\n- lockfile>=0.10\r\n- ConfigSpace>=0.2.1\r\n- pyrfr==0.2.1\r\n\n", "before_files": [{"content": "from warnings import warn\n\nimport pkg_resources\nimport re\n\nfrom distutils.version import LooseVersion\n\n\nRE_PATTERN = re.compile('^(?P<name>[\\w\\-]+)((?P<operation>==|>=|>)(?P<version>(\\d+\\.)?(\\d+\\.)?(\\d+)))?$')\n\n\ndef verify_packages(packages):\n    if not packages:\n        return\n    if isinstance(packages, str):\n        packages = packages.splitlines()\n\n    for package in packages:\n        if not package:\n            continue\n\n        match = RE_PATTERN.match(package)\n        if match:\n            name = match.group('name')\n            operation = match.group('operation')\n            version = match.group('version')\n            _verify_package(name, operation, version)\n        else:\n            raise ValueError('Unable to read requirement: %s' % package)\n\n\ndef _verify_package(name, operation, version):\n    try:\n        module = pkg_resources.get_distribution(name)\n    except pkg_resources.DistributionNotFound:\n        raise MissingPackageError(name) from None\n\n    if not operation:\n        return\n\n    required_version = LooseVersion(version)\n    installed_version = LooseVersion(module.version)\n\n    if operation == '==':\n        check = required_version == installed_version\n    elif operation == '>':\n        check = installed_version > required_version\n    elif operation == '>=':\n        check = installed_version > required_version or \\\n                installed_version == required_version\n    else:\n        raise NotImplementedError('operation \\'%s\\' is not supported' % operation)\n    if not check:\n        raise IncorrectPackageVersionError(name, installed_version, operation, required_version)\n\n\nclass MissingPackageError(Exception):\n\n    error_message = 'mandatory package \\'{name}\\' not found'\n\n    def __init__(self, package_name):\n        self.package_name = package_name\n        super(MissingPackageError, self).__init__(self.error_message.format(name=package_name))\n\n\nclass IncorrectPackageVersionError(Exception):\n\n    error_message = '\\'{name} {installed_version}\\' version mismatch ({operation}{required_version})'\n\n    def __init__(self, package_name, installed_version, operation, required_version):\n        self.package_name = package_name\n        self.installed_version = installed_version\n        self.operation = operation\n        self.required_version = required_version\n        message = self.error_message.format(name=package_name,\n                                            installed_version=installed_version,\n                                            operation=operation,\n                                            required_version=required_version)\n        super(IncorrectPackageVersionError, self).__init__(message)\n", "path": "autosklearn/util/dependencies.py"}], "after_files": [{"content": "from warnings import warn\n\nimport pkg_resources\nimport re\n\nfrom distutils.version import LooseVersion\n\n\nRE_PATTERN = re.compile('^(?P<name>[\\w\\-]+)((?P<operation>==|>=|>)(?P<version>(\\d+\\.)?(\\d+\\.)?(\\d+)))?$')\n\n\ndef verify_packages(packages):\n    if not packages:\n        return\n    if isinstance(packages, str):\n        packages = packages.splitlines()\n\n    for package in packages:\n        if not package:\n            continue\n\n        match = RE_PATTERN.match(package)\n        if match:\n            name = match.group('name')\n            operation = match.group('operation')\n            version = match.group('version')\n            _verify_package(name, operation, version)\n        else:\n            raise ValueError('Unable to read requirement: %s' % package)\n\n\ndef _verify_package(name, operation, version):\n    try:\n        module = pkg_resources.get_distribution(name)\n    except pkg_resources.DistributionNotFound:\n        raise MissingPackageError(name)\n\n    if not operation:\n        return\n\n    required_version = LooseVersion(version)\n    installed_version = LooseVersion(module.version)\n\n    if operation == '==':\n        check = required_version == installed_version\n    elif operation == '>':\n        check = installed_version > required_version\n    elif operation == '>=':\n        check = installed_version > required_version or \\\n                installed_version == required_version\n    else:\n        raise NotImplementedError('operation \\'%s\\' is not supported' % operation)\n    if not check:\n        raise IncorrectPackageVersionError(name, installed_version, operation, required_version)\n\n\nclass MissingPackageError(Exception):\n\n    error_message = 'mandatory package \\'{name}\\' not found'\n\n    def __init__(self, package_name):\n        self.package_name = package_name\n        super(MissingPackageError, self).__init__(self.error_message.format(name=package_name))\n\n\nclass IncorrectPackageVersionError(Exception):\n\n    error_message = '\\'{name} {installed_version}\\' version mismatch ({operation}{required_version})'\n\n    def __init__(self, package_name, installed_version, operation, required_version):\n        self.package_name = package_name\n        self.installed_version = installed_version\n        self.operation = operation\n        self.required_version = required_version\n        message = self.error_message.format(name=package_name,\n                                            installed_version=installed_version,\n                                            operation=operation,\n                                            required_version=required_version)\n        super(IncorrectPackageVersionError, self).__init__(message)\n", "path": "autosklearn/util/dependencies.py"}]}