code: def sphinx_test_tempdir(tmp_path_factory: Any) -> Path:
      """Temporary directory."""
      return tmp_path_factory.getbasetemp()
  
imports: from __future__ import annotations
  import shutil
  import subprocess
  import sys
  from collections import namedtuple
  from io import StringIO
  from typing import TYPE_CHECKING, Any, Callable
  import pytest
  from sphinx.testing.util import SphinxTestApp, SphinxTestAppWrapperForSkipBuilding
label_desc: Use image node_id 12 for calling a global function with example usage: sphinx_test_tempdir(tmp_path_factory) and returns: tmp_path_factory