code: def identify_ftz_culprits():
      """Find the modules in sys.modules which cause "mod" to be imported."""
      # If we've run this function before, return the same result.
      global KNOWN_FTZ
      if KNOWN_FTZ:
          return KNOWN_FTZ
      # Start by determining our baseline: the FTZ and sys.modules state in a fresh
      # process which has only imported this module and nothing else.
      always_enables_ftz, always_imports = run_in_process(
          always_imported_modules
      )
      if always_enables_ftz:
          raise RuntimeError(
              "Python is always in FTZ mode, even without imports!"
          )
      CHECKED_CACHE.update(always_imports)
  
      # Next, we'll search through sys.modules looking for a package (or packages) such
      # that importing them in a new process sets the FTZ state.  As a heuristic, we'll
      # start with packages known to have ever enabled FTZ, then top-level packages as
      # a way to eliminate large fractions of the search space relatively quickly.
      def key(name):
          """Prefer known-FTZ modules, then top-level packages, then alphabetical."""
          return (
              name not in KNOWN_EVER_CULPRITS,
              name.count("."),
              name,
          )
  
      # We'll track the set of modules to be checked, and those which do trigger FTZ.
      candidates = set(sys.modules) - CHECKED_CACHE
      triggering_modules = {}
      while candidates:
          mod = min(candidates, key=key)
          candidates.discard(mod)
          enables_ftz, imports = run_in_process(
              modules_imported_by, mod
          )
          imports -= CHECKED_CACHE
          if enables_ftz:
              triggering_modules[mod] = imports
              candidates &= imports
          else:
              candidates -= imports
              CHECKED_CACHE.update(imports)
  
      # We only want to report the 'top level' packages which enable FTZ - for example,
      # if the enabling code is in `a.b`, and `a` in turn imports `a.b`, we prefer to
      # report `a`.  On the other hand, if `a` does _not_ import `a.b`, as is the case
      # for `hypothesis.extra.*` modules, then `a` will not be in `triggering_modules`
      # and we'll report `a.b` here instead.
      prefixes = tuple(n + "." for n in triggering_modules)
      result = {
          k for k in triggering_modules if not k.startswith(prefixes)
      }
  
      # Suppose that `bar` enables FTZ, and `foo` imports `bar`.  At this point we're
      # tracking both, but only want to report the latter.
      for a in sorted(result):
          for b in sorted(result):
              if (
                  a in triggering_modules[b]
                  and b not in triggering_modules[a]
              ):
                  result.discard(b)
  
      # There may be a cyclic dependency which that didn't handle, or simply two
      # separate modules which both enable FTZ.  We already gave up comprehensive
      # reporting for speed above (`candidates &= imports`), so we'll also buy
      # simpler reporting by arbitrarily selecting the alphabetically first package.
      KNOWN_FTZ = min(
          result
      )  # Cache the result - it's likely this will trigger again!
      return KNOWN_FTZ
  
file_path: catboost/contrib/python/hypothesis/py3/_hypothesis_ftz_detector.py
imports: import importlib
  import sys
label_desc: Use image node_id 6 for calling a global function with example usage: identify_ftz_culprits() and returns: KNOWN_FTZ, KNOWN_FTZ, unknown,  name,  name