code: def find_python():
      if hasattr(sys, "frozen"):
          if sys.platform == "darwin":
              app_python = os.path.join(
                  os.path.dirname(os.environ["ARGVZERO"]), "python"
              )
              return app_python
      return sys.executable
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/utilities/analysis.py
imports: import os
  import sys
  import threading
  from importlib.util import find_spec
label_desc: Use image node_id 1 for calling a global function with example usage: find_python() and returns: sys, app_python