We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Discovery checks for removed oauth2client dependency 
In 9eb303e10cc9d6aa09137d1d68a0673e5aa5b4b0, 3 days ago, the dependency on `oauth2client` was dropped (yay!), but it seems that the Discovery API client is still checking for oauth2client in [apiclient/\_\_init\_\_.py](https://github.com/google/google-api-python-client/blob/081d2a336393a5d497339e462875294cfd8c81ea/apiclient/__init__.py#L7-L16) and claiming I need to upgrade my installation of `google-api-python-client`. Running `pip install -I google-api-python-client` doesn't clear the error message.

```
$ python3 -m venv test-gapi
epall@Calypso:/private/tmp
$ . test-gapi/bin/activate
(test-gapi) epall@Calypso:/private/tmp
$ pip freeze
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(test-gapi) epall@Calypso:/private/tmp
$ pip install google-api-python-client
Collecting google-api-python-client
  Using cached https://files.pythonhosted.org/packages/77/24/6a493cff23e60d882598e92b03d9f2c3c77299a9578b4411636616c039f4/google_api_python_client-1.7.1-py2.py3-none-any.whl
Collecting uritemplate<4dev,>=3.0.0 (from google-api-python-client)
  Using cached https://files.pythonhosted.org/packages/e5/7d/9d5a640c4f8bf2c8b1afc015e9a9d8de32e13c9016dcc4b0ec03481fb396/uritemplate-3.0.0-py2.py3-none-any.whl
Collecting httplib2<1dev,>=0.9.2 (from google-api-python-client)
Collecting google-auth>=1.4.1 (from google-api-python-client)
  Using cached https://files.pythonhosted.org/packages/53/06/6e6d5bfa4d23ee40efd772d6b681a7afecd859a9176e564b8c329382370f/google_auth-1.5.0-py2.py3-none-any.whl
Collecting google-auth-httplib2>=0.0.3 (from google-api-python-client)
  Using cached https://files.pythonhosted.org/packages/33/49/c814d6d438b823441552198f096fcd0377fd6c88714dbed34f1d3c8c4389/google_auth_httplib2-0.0.3-py2.py3-none-any.whl
Collecting six<2dev,>=1.6.1 (from google-api-python-client)
  Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting cachetools>=2.0.0 (from google-auth>=1.4.1->google-api-python-client)
  Using cached https://files.pythonhosted.org/packages/0a/58/cbee863250b31d80f47401d04f34038db6766f95dea1cc909ea099c7e571/cachetools-2.1.0-py2.py3-none-any.whl
Collecting rsa>=3.1.4 (from google-auth>=1.4.1->google-api-python-client)
  Using cached https://files.pythonhosted.org/packages/e1/ae/baedc9cb175552e95f3395c43055a6a5e125ae4d48a1d7a924baca83e92e/rsa-3.4.2-py2.py3-none-any.whl
Collecting pyasn1-modules>=0.2.1 (from google-auth>=1.4.1->google-api-python-client)
  Using cached https://files.pythonhosted.org/packages/e9/51/bcd96bf6231d4b2cc5e023c511bee86637ba375c44a6f9d1b4b7ad1ce4b9/pyasn1_modules-0.2.1-py2.py3-none-any.whl
Collecting pyasn1>=0.1.3 (from rsa>=3.1.4->google-auth>=1.4.1->google-api-python-client)
  Using cached https://files.pythonhosted.org/packages/a0/70/2c27740f08e477499ce19eefe05dbcae6f19fdc49e9e82ce4768be0643b9/pyasn1-0.4.3-py2.py3-none-any.whl
Installing collected packages: uritemplate, httplib2, cachetools, pyasn1, rsa, pyasn1-modules, six, google-auth, google-auth-httplib2, google-api-python-client
Successfully installed cachetools-2.1.0 google-api-python-client-1.7.1 google-auth-1.5.0 google-auth-httplib2-0.0.3 httplib2-0.11.3 pyasn1-0.4.3 pyasn1-modules-0.2.1 rsa-3.4.2 six-1.11.0 uritemplate-3.0.0
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(test-gapi) epall@Calypso:/private/tmp
$ python
Python 3.6.5 (default, Apr 10 2018, 11:19:37)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import apiclient.discovery
Traceback (most recent call last):
  File "/private/tmp/test-gapi/lib/python3.6/site-packages/apiclient/__init__.py", line 8, in <module>
    import oauth2client
ModuleNotFoundError: No module named 'oauth2client'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/private/tmp/test-gapi/lib/python3.6/site-packages/apiclient/__init__.py", line 11, in <module>
    'Previous version of google-api-python-client detected; due to a '
RuntimeError: Previous version of google-api-python-client detected; due to a packaging issue, we cannot perform an in-place upgrade. To repair, remove and reinstall this package, along with oauth2client and uritemplate. One can do this with pip via
  pip install -I google-api-python-client
>>>
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `apiclient/__init__.py`
Content:
```
1 """Retain apiclient as an alias for googleapiclient."""
2 
3 from six import iteritems
4 
5 import googleapiclient
6 
7 try:
8   import oauth2client
9 except ImportError:
10   raise RuntimeError(
11       'Previous version of google-api-python-client detected; due to a '
12       'packaging issue, we cannot perform an in-place upgrade. To repair, '
13       'remove and reinstall this package, along with oauth2client and '
14       'uritemplate. One can do this with pip via\n'
15       '  pip install -I google-api-python-client'
16   )
17 
18 from googleapiclient import channel
19 from googleapiclient import discovery
20 from googleapiclient import errors
21 from googleapiclient import http
22 from googleapiclient import mimeparse
23 from googleapiclient import model
24 from googleapiclient import sample_tools
25 from googleapiclient import schema
26 
27 __version__ = googleapiclient.__version__
28 
29 _SUBMODULES = {
30     'channel': channel,
31     'discovery': discovery,
32     'errors': errors,
33     'http': http,
34     'mimeparse': mimeparse,
35     'model': model,
36     'sample_tools': sample_tools,
37     'schema': schema,
38 }
39 
40 import sys
41 for module_name, module in iteritems(_SUBMODULES):
42   sys.modules['apiclient.%s' % module_name] = module
43
```
--- 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/apiclient/__init__.py b/apiclient/__init__.py
--- a/apiclient/__init__.py
+++ b/apiclient/__init__.py
@@ -4,17 +4,6 @@
 
 import googleapiclient
 
-try:
-  import oauth2client
-except ImportError:
-  raise RuntimeError(
-      'Previous version of google-api-python-client detected; due to a '
-      'packaging issue, we cannot perform an in-place upgrade. To repair, '
-      'remove and reinstall this package, along with oauth2client and '
-      'uritemplate. One can do this with pip via\n'
-      '  pip install -I google-api-python-client'
-  )
-
 from googleapiclient import channel
 from googleapiclient import discovery
 from googleapiclient import errors

{"golden_diff": "diff --git a/apiclient/__init__.py b/apiclient/__init__.py\n--- a/apiclient/__init__.py\n+++ b/apiclient/__init__.py\n@@ -4,17 +4,6 @@\n \n import googleapiclient\n \n-try:\n-  import oauth2client\n-except ImportError:\n-  raise RuntimeError(\n-      'Previous version of google-api-python-client detected; due to a '\n-      'packaging issue, we cannot perform an in-place upgrade. To repair, '\n-      'remove and reinstall this package, along with oauth2client and '\n-      'uritemplate. One can do this with pip via\\n'\n-      '  pip install -I google-api-python-client'\n-  )\n-\n from googleapiclient import channel\n from googleapiclient import discovery\n from googleapiclient import errors\n", "issue": "Discovery checks for removed oauth2client dependency \nIn 9eb303e10cc9d6aa09137d1d68a0673e5aa5b4b0, 3 days ago, the dependency on `oauth2client` was dropped (yay!), but it seems that the Discovery API client is still checking for oauth2client in [apiclient/\\_\\_init\\_\\_.py](https://github.com/google/google-api-python-client/blob/081d2a336393a5d497339e462875294cfd8c81ea/apiclient/__init__.py#L7-L16) and claiming I need to upgrade my installation of `google-api-python-client`. Running `pip install -I google-api-python-client` doesn't clear the error message.\r\n\r\n```\r\n$ python3 -m venv test-gapi\r\nepall@Calypso:/private/tmp\r\n$ . test-gapi/bin/activate\r\n(test-gapi) epall@Calypso:/private/tmp\r\n$ pip freeze\r\nYou are using pip version 9.0.3, however version 10.0.1 is available.\r\nYou should consider upgrading via the 'pip install --upgrade pip' command.\r\n(test-gapi) epall@Calypso:/private/tmp\r\n$ pip install google-api-python-client\r\nCollecting google-api-python-client\r\n  Using cached https://files.pythonhosted.org/packages/77/24/6a493cff23e60d882598e92b03d9f2c3c77299a9578b4411636616c039f4/google_api_python_client-1.7.1-py2.py3-none-any.whl\r\nCollecting uritemplate<4dev,>=3.0.0 (from google-api-python-client)\r\n  Using cached https://files.pythonhosted.org/packages/e5/7d/9d5a640c4f8bf2c8b1afc015e9a9d8de32e13c9016dcc4b0ec03481fb396/uritemplate-3.0.0-py2.py3-none-any.whl\r\nCollecting httplib2<1dev,>=0.9.2 (from google-api-python-client)\r\nCollecting google-auth>=1.4.1 (from google-api-python-client)\r\n  Using cached https://files.pythonhosted.org/packages/53/06/6e6d5bfa4d23ee40efd772d6b681a7afecd859a9176e564b8c329382370f/google_auth-1.5.0-py2.py3-none-any.whl\r\nCollecting google-auth-httplib2>=0.0.3 (from google-api-python-client)\r\n  Using cached https://files.pythonhosted.org/packages/33/49/c814d6d438b823441552198f096fcd0377fd6c88714dbed34f1d3c8c4389/google_auth_httplib2-0.0.3-py2.py3-none-any.whl\r\nCollecting six<2dev,>=1.6.1 (from google-api-python-client)\r\n  Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl\r\nCollecting cachetools>=2.0.0 (from google-auth>=1.4.1->google-api-python-client)\r\n  Using cached https://files.pythonhosted.org/packages/0a/58/cbee863250b31d80f47401d04f34038db6766f95dea1cc909ea099c7e571/cachetools-2.1.0-py2.py3-none-any.whl\r\nCollecting rsa>=3.1.4 (from google-auth>=1.4.1->google-api-python-client)\r\n  Using cached https://files.pythonhosted.org/packages/e1/ae/baedc9cb175552e95f3395c43055a6a5e125ae4d48a1d7a924baca83e92e/rsa-3.4.2-py2.py3-none-any.whl\r\nCollecting pyasn1-modules>=0.2.1 (from google-auth>=1.4.1->google-api-python-client)\r\n  Using cached https://files.pythonhosted.org/packages/e9/51/bcd96bf6231d4b2cc5e023c511bee86637ba375c44a6f9d1b4b7ad1ce4b9/pyasn1_modules-0.2.1-py2.py3-none-any.whl\r\nCollecting pyasn1>=0.1.3 (from rsa>=3.1.4->google-auth>=1.4.1->google-api-python-client)\r\n  Using cached https://files.pythonhosted.org/packages/a0/70/2c27740f08e477499ce19eefe05dbcae6f19fdc49e9e82ce4768be0643b9/pyasn1-0.4.3-py2.py3-none-any.whl\r\nInstalling collected packages: uritemplate, httplib2, cachetools, pyasn1, rsa, pyasn1-modules, six, google-auth, google-auth-httplib2, google-api-python-client\r\nSuccessfully installed cachetools-2.1.0 google-api-python-client-1.7.1 google-auth-1.5.0 google-auth-httplib2-0.0.3 httplib2-0.11.3 pyasn1-0.4.3 pyasn1-modules-0.2.1 rsa-3.4.2 six-1.11.0 uritemplate-3.0.0\r\nYou are using pip version 9.0.3, however version 10.0.1 is available.\r\nYou should consider upgrading via the 'pip install --upgrade pip' command.\r\n(test-gapi) epall@Calypso:/private/tmp\r\n$ python\r\nPython 3.6.5 (default, Apr 10 2018, 11:19:37)\r\n[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import apiclient.discovery\r\nTraceback (most recent call last):\r\n  File \"/private/tmp/test-gapi/lib/python3.6/site-packages/apiclient/__init__.py\", line 8, in <module>\r\n    import oauth2client\r\nModuleNotFoundError: No module named 'oauth2client'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/private/tmp/test-gapi/lib/python3.6/site-packages/apiclient/__init__.py\", line 11, in <module>\r\n    'Previous version of google-api-python-client detected; due to a '\r\nRuntimeError: Previous version of google-api-python-client detected; due to a packaging issue, we cannot perform an in-place upgrade. To repair, remove and reinstall this package, along with oauth2client and uritemplate. One can do this with pip via\r\n  pip install -I google-api-python-client\r\n>>>\r\n```\n", "before_files": [{"content": "\"\"\"Retain apiclient as an alias for googleapiclient.\"\"\"\n\nfrom six import iteritems\n\nimport googleapiclient\n\ntry:\n  import oauth2client\nexcept ImportError:\n  raise RuntimeError(\n      'Previous version of google-api-python-client detected; due to a '\n      'packaging issue, we cannot perform an in-place upgrade. To repair, '\n      'remove and reinstall this package, along with oauth2client and '\n      'uritemplate. One can do this with pip via\\n'\n      '  pip install -I google-api-python-client'\n  )\n\nfrom googleapiclient import channel\nfrom googleapiclient import discovery\nfrom googleapiclient import errors\nfrom googleapiclient import http\nfrom googleapiclient import mimeparse\nfrom googleapiclient import model\nfrom googleapiclient import sample_tools\nfrom googleapiclient import schema\n\n__version__ = googleapiclient.__version__\n\n_SUBMODULES = {\n    'channel': channel,\n    'discovery': discovery,\n    'errors': errors,\n    'http': http,\n    'mimeparse': mimeparse,\n    'model': model,\n    'sample_tools': sample_tools,\n    'schema': schema,\n}\n\nimport sys\nfor module_name, module in iteritems(_SUBMODULES):\n  sys.modules['apiclient.%s' % module_name] = module\n", "path": "apiclient/__init__.py"}], "after_files": [{"content": "\"\"\"Retain apiclient as an alias for googleapiclient.\"\"\"\n\nfrom six import iteritems\n\nimport googleapiclient\n\nfrom googleapiclient import channel\nfrom googleapiclient import discovery\nfrom googleapiclient import errors\nfrom googleapiclient import http\nfrom googleapiclient import mimeparse\nfrom googleapiclient import model\nfrom googleapiclient import sample_tools\nfrom googleapiclient import schema\n\n__version__ = googleapiclient.__version__\n\n_SUBMODULES = {\n    'channel': channel,\n    'discovery': discovery,\n    'errors': errors,\n    'http': http,\n    'mimeparse': mimeparse,\n    'model': model,\n    'sample_tools': sample_tools,\n    'schema': schema,\n}\n\nimport sys\nfor module_name, module in iteritems(_SUBMODULES):\n  sys.modules['apiclient.%s' % module_name] = module\n", "path": "apiclient/__init__.py"}]}