<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _InstallImportHookBySuffix():
 """Lazily installs import hook."""

  global _real_import

  if _real_import:
    return  # Import hook already installed

  _real_import = getattr(builtins, '__import__')
  assert _real_import
  builtins.__import__ = _ImportHookBySuffix

  if six.PY3:
    # In Python 2, importlib.import_module calls __import__ internally so
    # overriding __import__ is enough. In Python 3, they are separate so it also
    # needs to be overwritten.
    global _real_import_module
    _real_import_module = importlib.import_module
    assert _real_import_module
    importlib.import_module = _ImportModuleHookBySuffix