code: def _getuserbase():
      env_base = os.environ.get("PYTHONUSERBASE", None)
      if env_base:
          return env_base
  
      # Emscripten, VxWorks, and WASI have no home directories
      if sys.platform in {"emscripten", "vxworks", "wasi"}:
          return None
  
      def joinuser(*args):
          return os.path.expanduser(os.path.join(*args))
  
      if os.name == "nt":
          base = os.environ.get("APPDATA") or "~"
          return joinuser(base, _get_implementation())
  
      if sys.platform == "darwin" and sys._framework:
          return joinuser(
              "~",
              "Library",
              sys._framework,
              f"{sys.version_info[0]}.{sys.version_info[1]}",
          )
  
      return joinuser("~", ".local")
  
imports: import os
  import sys
  import threading
  from os.path import realpath
label_desc: Use image node_id 2 for calling a global function with example usage: _getuserbase() and returns: joinuser, env_base, None, os, joinuser, joinuser