code: def tempdir():
      # there are better ways to do temp directories, but it's a simple example:
      path = mkdtemp()
      cwd = getcwd()
      try:
          chdir(path)
          yield path
      finally:
          chdir(cwd)
          rmtree(path)
  
file_path: lifelines/docs/conftest.py
imports: from os import chdir, getcwd
  from shutil import rmtree
  from tempfile import mkdtemp
  import pytest
  from sybil import Sybil
  from sybil.parsers.codeblock import CodeBlockParser
  from sybil.parsers.doctest import DocTestParser
label_desc: Use image node_id 1 for calling a global function with example usage: tempdir() without return types