code: def _block_greedy_completer_execution():
      """
      Handles an annoying edge case in `init_backend()`:
        - IPython uses "greedy" TAB-completion, meaning code is actually
          executed in order to determine autocomplete suggestions
            + there is a config setting to disable this, but it's enabled
              by default
        - if TAB-completion is used in an import statement, the module is
          actually imported if it hasn't been previously [1], which means
          that for `hypertools`, `init_backend()` will be run
        - because the TAB-completion happens in a non-IPython subprocess,
          the backend will be initialized for non-notebook use.
  
      To correct this, the function:
        - looks through the stack trace for a call made from IPython's
          TAB-completion module (`IPython/core/completerlib.py`)
            + this is probably the safest way to do the search, since A)
              the module name is less likely to change than the function
              name or line number, and B) searching for *any* IPython
              module would break importing `hypertools` in an IPython shell
            + this is also probably the fastest way to search, since A) it
              short-circuits on the first call specific to this scenario,
              and B) the call stack will usually be at most a few imports
              deep in non-notebook environments
            + at minimum, the last 3 calls will always be from `hypertools`
              so they're skipped to save time
        - if it finds one, removes both `hypertools.plot` and
          `hypertools.plot.backend` (and also `numpy`) from `sys.modules`...
            + the `import` statement (`importlib.__import__()`) checks
              `sys.modules` for already-loaded modules before importing,
              so removing these causes them to be reloaded when the
              `import` command is actually run
            + both `hypertools.plot` and `hypertools.plot.backend` need to
              be removed to avoid using the cached call to `init_backend()`
            + `numpy` is also unloaded, otherwise its C extensions get
              confused when `hypertools` is re-imported and issue a whole
              slew of warnings
        - ...and raises a generic exception (handled in [1]), which skips
          running the rest of `init_backend()` while still allowing the
          TAB-completer to keep searching other `hypertools` modules
            + Also, since both of the removed modules will already have
              been seen by the completer at this point, they'll still be
              shown as autocomplete options despite not being in
              `sys.modules`.
  
      [1] https://github.com/ipython/ipython/blob/2b4bc75ac735a2541125b3baf299504e5513994a/IPython/core/completerlib.py#L158
      """
      stack_trace = traceback.extract_stack()[-4::-1]
      completer_module = "IPython/core/completerlib.py"
      try:
          next(
              entry
              for entry in stack_trace
              if entry.filename.endswith(completer_module)
          )
      except StopIteration:
          return
      else:
          for module in (
              "hypertools.plot",
              "hypertools.plot.backend",
              "numpy",
          ):
              try:
                  sys.modules.pop(module)
              except KeyError:
                  pass
  
          raise Exception
  
imports: import inspect
  import sys
  import traceback
  import warnings
  from contextlib import contextmanager, redirect_stdout
  from functools import wraps
  from io import StringIO
  from os import getenv
  from typing import Iterable
  import matplotlib
  import matplotlib.pyplot
  from .._shared.exceptions import HypertoolsBackendError
label_desc: Use image node_id 2 for calling a global function with example usage: _block_greedy_completer_execution() without return types