code: def test_dir():
      dirpath = tempfile.mkdtemp()
      yield dirpath
      shutil.rmtree(dirpath)
  
file_path: sherpa/tests/testing_utils.py
imports: import pytest
  import sherpa
  import sherpa.core
  import sherpa.schedulers
  import sherpa.database
  import logging
  import tempfile
  import shutil
label_desc: Use image node_id 4 for calling a global function with example usage: test_dir() without return types