code: def temp_dir():
      tmp_dir = mkdtemp()
      try:
          yield Path(tmp_dir)
      finally:
          shutil.rmtree(tmp_dir)
  
file_path: snips-nlu/snips_nlu/common/io_utils.py
imports: import errno
  import os
  import shutil
  from contextlib import contextmanager
  from pathlib import Path
  from tempfile import mkdtemp
  from zipfile import ZipFile, ZIP_DEFLATED
label_desc: Use image node_id 2 for calling a global function with example usage: temp_dir() without return types