code: def interpreter_requires_environment():
      """
      Returns True if our sys.executable interpreter requires environment
      variables in order to be able to run at all.
  
      This is designed to be used with @unittest.skipIf() to annotate tests
      that need to use an assert_python*() function to launch an isolated
      mode (-I) or no environment mode (-E) sub-interpreter process.
  
      A normal build & test does not run into this situation but it can happen
      when trying to run the standard library test suite from an interpreter that
      doesn't have an obvious home with Python's current home finding logic.
  
      Setting PYTHONHOME is one way to get most of the testsuite to run in that
      situation.  PYTHONPATH or PYTHONUSERSITE are other common environment
      variables that might impact whether or not the interpreter can start.
      """
      global __cached_interp_requires_environment
      if __cached_interp_requires_environment is None:
          # If PYTHONHOME is set, assume that we need it
          if "PYTHONHOME" in os.environ:
              __cached_interp_requires_environment = True
              return True
          # cannot run subprocess, assume we don't need it
          if not support.has_subprocess_support:
              __cached_interp_requires_environment = False
              return False
  
          # Try running an interpreter with -E to see if it works or not.
          try:
              subprocess.check_call(
                  [
                      sys.executable,
                      "-E",
                      "-c",
                      "import sys; sys.exit(0)",
                  ]
              )
          except subprocess.CalledProcessError:
              __cached_interp_requires_environment = True
          else:
              __cached_interp_requires_environment = False
  
      return __cached_interp_requires_environment
  
imports: import collections
  import importlib
  import sys
  import os
  import os.path
  import subprocess
  import py_compile
  from importlib.util import source_from_cache
  from test import support
  from test.support.import_helper import make_legacy_pyc
label_desc: Use image node_id 1 for calling a global function with example usage: interpreter_requires_environment() and returns: __cached_interp_requires_environment, True, False