code: def temp_directory(*args, **kwargs):
      
  
      path = tempfile.mkdtemp(*args, **kwargs)
      try:
          yield path
      finally:
          shutil.rmtree(path)
docs: Context manager returns a path created by mkdtemp and cleans it up afterwards.