code: def get_temp_dir():
      # get name of a temp directory which will be automatically cleaned up
      tempdir = process.current_process()._config.get("tempdir")
      if tempdir is None:
          import shutil, tempfile
  
          tempdir = tempfile.mkdtemp(prefix="pymp-")
          info("created temp directory %s", tempdir)
          # keep a strong reference to shutil.rmtree(), since the finalizer
          # can be called late during Python shutdown
          Finalize(
              None,
              _remove_temp_dir,
              args=(shutil.rmtree, tempdir),
              exitpriority=-100,
          )
          process.current_process()._config["tempdir"] = tempdir
      return tempdir
  
imports: import os
  import itertools
  import sys
  import weakref
  import atexit
  import threading
  from subprocess import _args_from_interpreter_flags
  from .None import process
label_desc: Use image node_id 10 for calling a global function with example usage: get_temp_dir() and returns: tempdir