We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[FEAT][GENERAL] check for the latest version and notify if using an older version
**Describe the solution you'd like**
Check that the latest version is installed and raise a warning when importing the package if it's not the latest version.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `deepchecks/__init__.py`
Content:
```
1 # ----------------------------------------------------------------------------
2 # Copyright (C) 2021-2022 Deepchecks (https://www.deepchecks.com)
3 #
4 # This file is part of Deepchecks.
5 # Deepchecks is distributed under the terms of the GNU Affero General
6 # Public License (version 3 or later).
7 # You should have received a copy of the GNU Affero General Public License
8 # along with Deepchecks.  If not, see <http://www.gnu.org/licenses/>.
9 # ----------------------------------------------------------------------------
10 #
11 """Deepchecks."""
12 import os
13 import pathlib
14 import warnings
15 import matplotlib
16 import plotly.io as pio
17 
18 
19 from deepchecks.utils.ipython import is_notebook
20 from deepchecks.tabular import (
21     Dataset,
22     Suite,
23     Context,
24     SingleDatasetCheck,
25     TrainTestCheck,
26     ModelOnlyCheck,
27     ModelComparisonCheck,
28     ModelComparisonSuite,
29 )
30 from deepchecks.core import (
31     BaseCheck,
32     BaseSuite,
33     CheckResult,
34     CheckFailure,
35     SuiteResult,
36     Condition,
37     ConditionResult,
38     ConditionCategory,
39     SingleDatasetBaseCheck,
40     TrainTestBaseCheck,
41     ModelOnlyBaseCheck
42 )
43 
44 
45 warnings.warn(
46     # TODO: better message
47     'Ability to import base tabular functionality from '
48     'the `deepchecks` directly is deprecated, please import from '
49     '`deepchecks.tabular` instead',
50     DeprecationWarning
51 )
52 
53 
54 __all__ = [
55     'BaseCheck',
56     'SingleDatasetBaseCheck',
57     'TrainTestBaseCheck',
58     'ModelOnlyBaseCheck',
59     'ModelComparisonCheck',
60     'CheckResult',
61     'CheckFailure',
62     'Condition',
63     'ConditionResult',
64     'ConditionCategory',
65     'BaseSuite',
66     'SuiteResult',
67 
68     # tabular checks
69     'SingleDatasetCheck',
70     'TrainTestCheck',
71     'ModelOnlyCheck',
72     'Dataset',
73     'Suite',
74     'ModelComparisonSuite',
75     'Context'
76 ]
77 
78 
79 # Matplotlib has multiple backends. If we are in a context that does not support GUI (For example, during unit tests)
80 # we can't use a GUI backend. Thus we must use a non-GUI backend.
81 if not is_notebook():
82     matplotlib.use('Agg')
83 
84 # We can't rely on that the user will have an active internet connection, thus we change the default backend to
85 # "notebook" If plotly detects the 'notebook-connected' backend.
86 # for more info, see: https://plotly.com/python/renderers/
87 pio_backends = pio.renderers.default.split('+')
88 if 'notebook_connected' in pio_backends:
89     pio_backends[pio_backends.index('notebook_connected')] = 'notebook'
90     pio.renderers.default = '+'.join(pio_backends)
91 
92 
93 # Set version info
94 try:
95     MODULE_DIR = pathlib.Path(__file__).absolute().parent.parent
96     with open(os.path.join(MODULE_DIR, 'VERSION'), 'r', encoding='utf-8') as f:
97         __version__ = f.read().strip()
98 except Exception:  # pylint: disable=broad-except
99     # If version file can't be found, leave version empty
100     __version__ = ''
101
```
--- 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/deepchecks/__init__.py b/deepchecks/__init__.py
--- a/deepchecks/__init__.py
+++ b/deepchecks/__init__.py
@@ -11,10 +11,11 @@
 """Deepchecks."""
 import os
 import pathlib
+import http.client
 import warnings
 import matplotlib
 import plotly.io as pio
-
+from pkg_resources import parse_version
 
 from deepchecks.utils.ipython import is_notebook
 from deepchecks.tabular import (
@@ -95,6 +96,20 @@
     MODULE_DIR = pathlib.Path(__file__).absolute().parent.parent
     with open(os.path.join(MODULE_DIR, 'VERSION'), 'r', encoding='utf-8') as f:
         __version__ = f.read().strip()
-except Exception:  # pylint: disable=broad-except
+except:  # pylint: disable=bare-except # noqa
     # If version file can't be found, leave version empty
     __version__ = ''
+
+# Check for latest version
+try:
+    disable = os.environ.get('DEEPCHECKS_DISABLE_LATEST', 'false').lower() == 'true'
+    if not disable:
+        conn = http.client.HTTPSConnection('api.deepchecks.com', timeout=3)
+        conn.request('GET', '/latest')
+        response = conn.getresponse()
+        latest_version = response.read().decode('utf-8')
+        if __version__ and parse_version(__version__) < parse_version(latest_version):
+            warnings.warn('Looks like you are using outdated version of deepchecks. consider upgrading using'
+                          ' pip install -U deepchecks')
+except:  # pylint: disable=bare-except # noqa
+    pass

{"golden_diff": "diff --git a/deepchecks/__init__.py b/deepchecks/__init__.py\n--- a/deepchecks/__init__.py\n+++ b/deepchecks/__init__.py\n@@ -11,10 +11,11 @@\n \"\"\"Deepchecks.\"\"\"\n import os\n import pathlib\n+import http.client\n import warnings\n import matplotlib\n import plotly.io as pio\n-\n+from pkg_resources import parse_version\n \n from deepchecks.utils.ipython import is_notebook\n from deepchecks.tabular import (\n@@ -95,6 +96,20 @@\n     MODULE_DIR = pathlib.Path(__file__).absolute().parent.parent\n     with open(os.path.join(MODULE_DIR, 'VERSION'), 'r', encoding='utf-8') as f:\n         __version__ = f.read().strip()\n-except Exception:  # pylint: disable=broad-except\n+except:  # pylint: disable=bare-except # noqa\n     # If version file can't be found, leave version empty\n     __version__ = ''\n+\n+# Check for latest version\n+try:\n+    disable = os.environ.get('DEEPCHECKS_DISABLE_LATEST', 'false').lower() == 'true'\n+    if not disable:\n+        conn = http.client.HTTPSConnection('api.deepchecks.com', timeout=3)\n+        conn.request('GET', '/latest')\n+        response = conn.getresponse()\n+        latest_version = response.read().decode('utf-8')\n+        if __version__ and parse_version(__version__) < parse_version(latest_version):\n+            warnings.warn('Looks like you are using outdated version of deepchecks. consider upgrading using'\n+                          ' pip install -U deepchecks')\n+except:  # pylint: disable=bare-except # noqa\n+    pass\n", "issue": "[FEAT][GENERAL] check for the latest version and notify if using an older version\n**Describe the solution you'd like**\r\nCheck that the latest version is installed and raise a warning when importing the package if it's not the latest version.\r\n\n", "before_files": [{"content": "# ----------------------------------------------------------------------------\n# Copyright (C) 2021-2022 Deepchecks (https://www.deepchecks.com)\n#\n# This file is part of Deepchecks.\n# Deepchecks is distributed under the terms of the GNU Affero General\n# Public License (version 3 or later).\n# You should have received a copy of the GNU Affero General Public License\n# along with Deepchecks.  If not, see <http://www.gnu.org/licenses/>.\n# ----------------------------------------------------------------------------\n#\n\"\"\"Deepchecks.\"\"\"\nimport os\nimport pathlib\nimport warnings\nimport matplotlib\nimport plotly.io as pio\n\n\nfrom deepchecks.utils.ipython import is_notebook\nfrom deepchecks.tabular import (\n    Dataset,\n    Suite,\n    Context,\n    SingleDatasetCheck,\n    TrainTestCheck,\n    ModelOnlyCheck,\n    ModelComparisonCheck,\n    ModelComparisonSuite,\n)\nfrom deepchecks.core import (\n    BaseCheck,\n    BaseSuite,\n    CheckResult,\n    CheckFailure,\n    SuiteResult,\n    Condition,\n    ConditionResult,\n    ConditionCategory,\n    SingleDatasetBaseCheck,\n    TrainTestBaseCheck,\n    ModelOnlyBaseCheck\n)\n\n\nwarnings.warn(\n    # TODO: better message\n    'Ability to import base tabular functionality from '\n    'the `deepchecks` directly is deprecated, please import from '\n    '`deepchecks.tabular` instead',\n    DeprecationWarning\n)\n\n\n__all__ = [\n    'BaseCheck',\n    'SingleDatasetBaseCheck',\n    'TrainTestBaseCheck',\n    'ModelOnlyBaseCheck',\n    'ModelComparisonCheck',\n    'CheckResult',\n    'CheckFailure',\n    'Condition',\n    'ConditionResult',\n    'ConditionCategory',\n    'BaseSuite',\n    'SuiteResult',\n\n    # tabular checks\n    'SingleDatasetCheck',\n    'TrainTestCheck',\n    'ModelOnlyCheck',\n    'Dataset',\n    'Suite',\n    'ModelComparisonSuite',\n    'Context'\n]\n\n\n# Matplotlib has multiple backends. If we are in a context that does not support GUI (For example, during unit tests)\n# we can't use a GUI backend. Thus we must use a non-GUI backend.\nif not is_notebook():\n    matplotlib.use('Agg')\n\n# We can't rely on that the user will have an active internet connection, thus we change the default backend to\n# \"notebook\" If plotly detects the 'notebook-connected' backend.\n# for more info, see: https://plotly.com/python/renderers/\npio_backends = pio.renderers.default.split('+')\nif 'notebook_connected' in pio_backends:\n    pio_backends[pio_backends.index('notebook_connected')] = 'notebook'\n    pio.renderers.default = '+'.join(pio_backends)\n\n\n# Set version info\ntry:\n    MODULE_DIR = pathlib.Path(__file__).absolute().parent.parent\n    with open(os.path.join(MODULE_DIR, 'VERSION'), 'r', encoding='utf-8') as f:\n        __version__ = f.read().strip()\nexcept Exception:  # pylint: disable=broad-except\n    # If version file can't be found, leave version empty\n    __version__ = ''\n", "path": "deepchecks/__init__.py"}], "after_files": [{"content": "# ----------------------------------------------------------------------------\n# Copyright (C) 2021-2022 Deepchecks (https://www.deepchecks.com)\n#\n# This file is part of Deepchecks.\n# Deepchecks is distributed under the terms of the GNU Affero General\n# Public License (version 3 or later).\n# You should have received a copy of the GNU Affero General Public License\n# along with Deepchecks.  If not, see <http://www.gnu.org/licenses/>.\n# ----------------------------------------------------------------------------\n#\n\"\"\"Deepchecks.\"\"\"\nimport os\nimport pathlib\nimport http.client\nimport warnings\nimport matplotlib\nimport plotly.io as pio\nfrom pkg_resources import parse_version\n\nfrom deepchecks.utils.ipython import is_notebook\nfrom deepchecks.tabular import (\n    Dataset,\n    Suite,\n    Context,\n    SingleDatasetCheck,\n    TrainTestCheck,\n    ModelOnlyCheck,\n    ModelComparisonCheck,\n    ModelComparisonSuite,\n)\nfrom deepchecks.core import (\n    BaseCheck,\n    BaseSuite,\n    CheckResult,\n    CheckFailure,\n    SuiteResult,\n    Condition,\n    ConditionResult,\n    ConditionCategory,\n    SingleDatasetBaseCheck,\n    TrainTestBaseCheck,\n    ModelOnlyBaseCheck\n)\n\n\nwarnings.warn(\n    # TODO: better message\n    'Ability to import base tabular functionality from '\n    'the `deepchecks` directly is deprecated, please import from '\n    '`deepchecks.tabular` instead',\n    DeprecationWarning\n)\n\n\n__all__ = [\n    'BaseCheck',\n    'SingleDatasetBaseCheck',\n    'TrainTestBaseCheck',\n    'ModelOnlyBaseCheck',\n    'ModelComparisonCheck',\n    'CheckResult',\n    'CheckFailure',\n    'Condition',\n    'ConditionResult',\n    'ConditionCategory',\n    'BaseSuite',\n    'SuiteResult',\n\n    # tabular checks\n    'SingleDatasetCheck',\n    'TrainTestCheck',\n    'ModelOnlyCheck',\n    'Dataset',\n    'Suite',\n    'ModelComparisonSuite',\n    'Context'\n]\n\n\n# Matplotlib has multiple backends. If we are in a context that does not support GUI (For example, during unit tests)\n# we can't use a GUI backend. Thus we must use a non-GUI backend.\nif not is_notebook():\n    matplotlib.use('Agg')\n\n# We can't rely on that the user will have an active internet connection, thus we change the default backend to\n# \"notebook\" If plotly detects the 'notebook-connected' backend.\n# for more info, see: https://plotly.com/python/renderers/\npio_backends = pio.renderers.default.split('+')\nif 'notebook_connected' in pio_backends:\n    pio_backends[pio_backends.index('notebook_connected')] = 'notebook'\n    pio.renderers.default = '+'.join(pio_backends)\n\n\n# Set version info\ntry:\n    MODULE_DIR = pathlib.Path(__file__).absolute().parent.parent\n    with open(os.path.join(MODULE_DIR, 'VERSION'), 'r', encoding='utf-8') as f:\n        __version__ = f.read().strip()\nexcept:  # pylint: disable=bare-except # noqa\n    # If version file can't be found, leave version empty\n    __version__ = ''\n\n# Check for latest version\ntry:\n    disable = os.environ.get('DEEPCHECKS_DISABLE_LATEST', 'false').lower() == 'true'\n    if not disable:\n        conn = http.client.HTTPSConnection('api.deepchecks.com', timeout=3)\n        conn.request('GET', '/latest')\n        response = conn.getresponse()\n        latest_version = response.read().decode('utf-8')\n        if __version__ and parse_version(__version__) < parse_version(latest_version):\n            warnings.warn('Looks like you are using outdated version of deepchecks. consider upgrading using'\n                          ' pip install -U deepchecks')\nexcept:  # pylint: disable=bare-except # noqa\n    pass\n", "path": "deepchecks/__init__.py"}]}