code: def tmp_path_factory(request):
      """Return a :class:`_pytest.tmpdir.TempPathFactory` instance for the test session."""
      return request.config._tmp_path_factory
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import re
  import tempfile
  import warnings
  import attr
  import py
  import six
  import pytest
  from .pathlib import ensure_reset_dir
  from .pathlib import LOCK_TIMEOUT
  from .pathlib import make_numbered_dir
  from .pathlib import make_numbered_dir_with_cleanup
  from .pathlib import Path
  from _pytest.monkeypatch import MonkeyPatch
label_desc: Use image node_id 4 for calling a global function with example usage: tmp_path_factory(request) and returns: request